-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maximum call stack size is exceeded if very large array is provided for diff #156
Comments
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. |
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.
The text was updated successfully, but these errors were encountered: