[PATCH] git: improve changelog and summary performance for large repos
Mads Kiilerich
mads at kiilerich.com
Thu Nov 26 00:52:55 UTC 2026
Thanks.
I finally got around to look at this. I pushed part of the changes to
the stable branch.
I do however see problems with the _empty fixes: They cause test
failures. I have not investigated why. Also, self.revisions is cached
and should not be recomputed that often. Can you clarify the exact code
path and problem you see?
/Mads
On 24/04/2026 13:44, Tomáš Musil wrote:
> 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
>
> _______________________________________________
> kallithea-general mailing list
> kallithea-general at sfconservancy.org
> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
More information about the kallithea-general
mailing list