react-diff-viewer-continued
react-diff-viewer-continued copied to clipboard
Page crashes due to excessive single line text
The following two text files are examples: string-1.txt string-2.txt
<ReactDiffViewer styles={{ contentText: { wordBreak: 'break-all' } }} oldValue={sourceValue || ''} newValue={targetValue || ''} showDiffOnly splitView />
After adding disableWordDiff, it can run normally. Is there a better solution
<ReactDiffViewer styles={{ contentText: { wordBreak: 'break-all' } }} oldValue={sourceValue || ''} newValue={targetValue || ''} showDiffOnly splitView disableWordDiff />
I don't think this thing was ever created to compare 50kb of pure noise on a single line. I think your issue comes from wordDiff trying to split changes on a single line as well, and doing that for 50kb of text is pretty intense (presumably the page crashes because the nested loop goes too deep)