[PATCH] git: improve changelog and summary performance for large repos
Tomáš Musil
tomas.musil at atrak.cz
Fri Apr 24 11:44:11 UTC 2026
Hello,
we have recently converted a large repo (22k revisions, 4k tags) from
Mercurial to Git and noticed a major slowdown when loading summary (8
seconds) and changelog (24 seconds) pages, when for Mercurial repo the
pages show basically instantly.
I have tracked down the issues to:
1. _empty() loads all revisions but just checking if repo has "head"
seems to do the trick
2. _heads() loads and iterates over all refs (including tags) but later
only checks /refs/heads and /refs/remotes/origin
3. SubprocessIOChunker's default buffer_size and chunk_size seem to be
pretty low in _run_git_command when running "git log" to get all revisions
I attempted to address the first two points in the attached patch, in
the third point I just mutiplied the defaults by 100 which seems to be
enough for our repo but definitely is not a properly calculated solution.
Overall these changes dropped summary loading time to <2sec and
changelog to <3sec for our large repo.
Thank you for keeping the Kallithea project alive.
Best regards,
Tomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: git_heads.patch
Type: text/x-patch
Size: 1555 bytes
Desc: not available
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20260424/28296c06/attachment.bin>
More information about the kallithea-general
mailing list