git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitk: avoid obscene memory consumption

From
Jacob Keller <jacob.keller@gmail.com>
Date
Nov 6, 2016, 20:33 UTC
Message-ID
<CA+P7+xo6qTjf3R1WTjyRUAn0-2pyKXRpf=v_aMJGPXQg39SweA@mail.gmail.com>
In-Reply-To
<ff5bb36b-e30c-3998-100d-789b4b5e7249@jump-ing.de>
On Sun, Nov 6, 2016 at 2:28 AM, Markus Hitter <mah@jump-ing.de> wrote:
> - 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.
>

This seems like the right solution. Store only what we need to view as we need to view it. (IE: lazily generate the diff and don't keep it long term, possibly by generating each file separately when that file is viewed)?

> - View the diff sparsely. Like rendering only the actually visible portion.
>
This also would be valuable, as part of the solution above.
> - 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.
>

I think all three suggestions here are a better solution that what you've outlined already as you explain the problems caused by cutting off the diff.

Thanks, Jake

Previous: Markus HitterNext: Paul Mackerras
Message 5 of 7 in “gitk: avoid obscene memory consumption”
  1. Markus HitterNov 4, 2016
  2. Stefan BellerNov 4, 2016
  3. Paul MackerrasNov 5, 2016
  4. Markus HitterNov 6, 2016
  5. Jacob KellerNov 6, 2016
  6. Paul MackerrasNov 7, 2016
  7. Markus HitterNov 7, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.