rtfpessoa / diff2html

Pretty diff to html javascript library (diff2html)
https://diff2html.xyz
MIT License
2.9k stars 280 forks source link

Way to split up large diff #534

Closed csm10495 closed 3 months ago

csm10495 commented 4 months ago

Hey folks,

If I have 2 large xml files that may differ a lot, is there a way to make the diff more workable via the generated html?

Is there a way to have it split the html into multiple files or dynamically load/unload the content? If I try to just render the diff, it could easily OOM my browser since the diff in plaintext can be pretty large.

rtfpessoa commented 3 months ago

👋 Currently there is no easy way to do it. I did this PoC https://github.com/rtfpessoa/diff2html/pull/410 a long time ago but never finished it.

One thing you can do is to invoke the parse and then only render certain files separately. If even parsing the whole things is too much, you would need to split the input.

If you are interested in contributing some improvements let me know and I can give some guidance.