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

QGit: Shrink used memory with custom git log format

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Nov 24, 2007, 08:14 UTC
Message-ID
<e5bfff550711240014n78f24b46qf012957d92b1a8e1@mail.gmail.com>
Hi all,
   I have pushed a patch series to
git://git.kernel.org/pub/scm/qgit/qgit4.git
that changes the format of git log used to read data from a git repository.

Now instead of --pretty=raw a custom made --pretty=format is given, this shrinks loaded data of 30% (17MB less on Linux tree) and gives a good speed up when you are low on memory (especially on big repos)

Next step _would_ be to load log message body on demand (another 50% reduction) but this has two drawbacks:

(1) Text search/filter on log message would be broken

(2) Slower to browse through revisions because for each revision an additional git-rev-list /git-log command should be executed to read the body

The second point is worsted by the fact that it is not possible to keep a command running and "open" like as example git-diff-tree --stdin and feed with additional revision's sha when needed. Avoiding the burden to startup a new process each time to read a new log message given an sha would let the answer much more quick especially on lesser OS's

Indeed there is a git-rev-list --stdin option but with different behaviour from git-diff-tree --stdin and not suitable for this.

Marco
Next: Shawn O. Pearce
Message 1 of 7 in “QGit: Shrink used memory with custom git log format”
  1. Marco CostalbaNov 24, 2007
  2. Shawn O. PearceNov 27, 2007
  3. Johannes SchindelinNov 27, 2007
  4. Marco CostalbaNov 27, 2007
  5. Jan HudecNov 27, 2007
  6. Johannes SchindelinNov 28, 2007
  7. jhud7196@artax.karlin.mff.cuni.czNov 28, 2007

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.