-
-
Notifications
You must be signed in to change notification settings - Fork 272
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
Handle large files #25
Comments
Encounter the same problem,looking forward optimization~ |
I need to diff large text(145k) with 90% difference, but actually the browser crashed when rendering large text. |
How long does it take |
@skyunBoss - I don't have a timeline for it. I'm experimenting with few techniques. But, I'll address this issue soon! |
Would the use of a web worker help? |
@praneshr I also have to support large diffs and my temporary solution is to display a spinner and put a message that this may take a while if the changeset is huge 😂. Have you thought about using |
@SamSamskies Thanks for the comment. Yes, I've explored the windowing option. But, I don't have the bandwidth to work on it now. So, I cannot guarantee a release date. Sorry. |
@praneshr np. I'll try and take a crack at it if I get some bandwidth myself. |
I think the main problem is the number of DOM nodes generated for large diffs, so I don't think web workers would help much. |
I am guessing that the problem stems from the "diff" library in the dependencies. It has the same unsolved issue with large diffs -> kpdecker/jsdiff#163 I suggest using https://github.com/google/diff-match-patch for handling large diffs |
Is there are progress on this one ? |
I'm hitting this one as well on a diff between two 3kb strings. The page essentially freezes and must be killed by the browser's task manager. The problem is definitely in the |
Check out this package: You can essentially get the same characteristics using Since you first operate on a line diff though, you'll need this part: There is also a section in there about actual word diff mode, if using the semantic cleanup is not appropriate. |
Would have liked to use this package, but I need this feature. Had to find another solution. |
Any updates on it. Or any one got an alternate solution for it. |
@lordprana Have you find any solution for the large data? |
So I figured that if you use json.Stringify(jsonstr, null, 2) to format the string first and then use json diff viewer then it's faster to compare. |
One can also try react-diff-viewer-continued along with json string formatted for new line using json.stringify(jsonstr, null, 2). |
Any progress on this issue? |
It looks like someone potentially fixed the issue and a new release is in the works though the owner of that library doesn't seem to be all that active either. This library would then need to be updated with it, but seeing as @praneshr doesn't seem to be working on this anymore, there might be more luck hoping for an update to the forked react-diff-viewer-continued instead. |
Try introducing the windowing technique to handle large DOM nodes.
The text was updated successfully, but these errors were encountered: