Open malhar-trivedi opened 8 years ago
that's nice!, thanks, I see what you mean now, the problem is in the LCS algorithm (used when diffing arrays), I suspect LCS might be a bit too expensive for very large arrays and we could fallback to a simpler strategy for these, or try to split the diff in chunks somehow. Just a guess though, thanks for bringing this up, I'll take a deeper look.
FWIW - Still see this issue in 0.2.4.
yes @kimptoc this ticket is still open.
hi, i am facing the same issue, i tried a work around by sorting both array using array sort(using all key in array's each object), without providing any hash function in jsondiffpatch, and i am certain it gives the right result when both arrays are equal, but how to get the diff when they are not equal? may i know if we are planning to fix this issue in near future?
node @v4.4.7 jsondiffpatch @0.1.43
while taking diff for very large arrays (it could contain more than 5k objects), I encounter this error.
Here's the sample code to reproduce this error. This sample data has large array size because value of object size is relatively small. as I increase object size, I can further reduce size of array.