[diffoscope] 06/06: html-dir: Show start of diff on parent page, even when split over child pages

Ximin Luo infinity0 at debian.org
Mon Sep 5 21:21:00 CEST 2016


Jérémy Bobbio:
> Ximin Luo:
>>     In order to do this, we have to also ditch the previous behaviour where
>>     max-diff-block-lines would interfere with diff's output on a deeper level,
>>     hiding it from *all* readers. If this is really needed, we can add it back in
>>     under a different name, that makes it obvious it operates at this deeper level
>>     instead of merely affecting the diff visual output.
> 
> I feel that this might result in very high memory usage in bad cases.
> I would recommend testing this on large input and low-end hardware
> beforing getting it into master.
> 

As a temporary workaround, I could reinstate the previous behaviour, but using the value for max-d-b-l-html-dir (default 1024) instead of max-d-b-l (default 50). I imagine this would be enough for low-end systems, and they could manually reduce 1024 to a smaller value if they need to. As an additional workaround, I could set max-diff-block-lines-html-dir = max-diff-block-lines if html-dir is not actually used.

However in the long run, I feel that the best way to solve this would be to re-architect diffoscope to:

1) do diffs in a lazy way, and
2) iterate through the Difference tree calling all presenters at the same time, rather than having each presenter iterate through it. Then we can just discard each diff-block as we go along the tree, and memory shouldn't be a problem even for low-end systems.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git


More information about the diffoscope mailing list