When comparing big number array with only a single difference, the command takes a lot of times to run.
How to reproduce
Generate a json containing a 10000 items array
jq -n --argjson items "$(shuf -i 0-9999 -n 10000 | jq -cs '.')" '{"items": $items}' > data.json
Run the jd on the generated file and a slightly modified json
cat data.json | jq '.items[503] = (input | tonumber)' <<< "$(shuf -i 0-9999 -n 1)" | jd data.json
Expected behavior
A patch is generated in a few milliseconds
Actual behavior
The command runs for more than 10 seconds before giving the result
When comparing big number array with only a single difference, the command takes a lot of times to run.
How to reproduce
Generate a json containing a 10000 items array
Run the jd on the generated file and a slightly modified json
Expected behavior
A patch is generated in a few milliseconds
Actual behavior
The command runs for more than 10 seconds before giving the result