Log performance slow on huge repository
Happened on a
~17GB repository with
Looks like some
big files in the history of that repo and
the repo is packed.
Thus, loading the diff information from pack file is heavy.
Use something like
git repack -a --max-pack-size=1g which mentioned by user, see this comment.
Suppose unpack also helps.
These configs on server side might be helpful on daily work(for pushing/pulling, to prevent big file packed):
- delta off
- Add an advanced settings
NoDiffIfNoActionwhich disable doing diff when action column is not shown.
- Refer to some idea from git-lfs and hack more git code, to improve our libgit.
While using the log is reasonably snappy on a repository containing about 4k revisions, using it on one(~17GB) containing about 27k revisions is a lot more painful.
It does get a little better over time (presumably something is being cached) and the worst case is definitely when first opening it after being cloned, but even on subsequent use there is visible hitching in the UI response times when scrolling or even when idle. (Admittedly that 4k-revisions one above has been in use for a while so some of its speed may be a cache illusion.)
Perhaps it should limit how much history is fetched, similar to TSVN (which defaults to the most recent 100 commits, though perhaps TGit could go a little higher).
Yue Lin Ho: This has been done in 126.96.36.199)
Most of the time people are only interested in the recent history, and as long as they can request more as needed it should be sufficient.