Re: gitk: avoid obscene memory consumption
On Sun, Nov 06, 2016 at 11:28:37AM +0100, Markus Hitter wrote:
Show 12 quoted lines
>
> Thanks for the positive comments.
>
> TBH, the more I think about the problem, the less I'm satisfied with the solution I provided. Including two reasons:
>
> - The list of files affected to the right is still complete and clicking a file name further down results in nothing ... as if the file wasn't part of the diff.
>
> - Local searches. Cutting off diffs makes them unreliable. Global searches still work, but actually viewing a search result in the skipped section is no longer possible.
>
> So I'm watching out for better solutions. So far I can think of these:
>
> - Storing only the actually viewed diff. It's an interactive tool, so there's no advantage in displaying the diff in 0.001 seconds over viewing it in 0.1 seconds. As far as I can see, Gitk currently stores every diff it gets a hold of forever.
It does? That would be a bug. :)
>
> - View the diff sparsely. Like rendering only the actually visible portion.
>
> - Enhancing ctext. This reference diff has 28 million characters, so there should be a way to store this with color information in, let's say, 29 MB of memory.
Tcl uses Unicode internally, I believe, so 57MB, but yes.
Paul.