git gc --aggressive led to about 40 times slower "git log --raw"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I've got a repository where "git log --raw > _somefile" took a few
seconds in the past, but after an attempt at merging some commits that
were collected in a clone of the same repo that was created about a
year ago, I noticed that this command was now taking 3 minutes 7
seconds. "git gc", "git fsck", "git clone file:///the/repo/.git" also
now each took between ~4-10 minutes, also "git log --raw somefile" got
equally unusably slow. With the help of the people on the IRC, I
tracked it down to my recent use of "git gc --aggressive" in this
repo. Running "git repack -a -d -f" solved it, now it's again taking
4-5 seconds. After running "git gc --aggressive" again for
confirmation, "git log --raw > _somefile" was again slowed down,
although now 'only' to 1 minute 34 seconds; did perhaps my "git remote
add -f other-repo", which I remember was also running rather slowly,
exacerbate the problem (to the > 3 minutes I was seeing)?

The repo has about 6000 commits, about 12'000 files in the current
HEAD, and about 43 MB packed .git contents. The files are (almost) all
plain text, about half of them are about 42 bytes long, the rest up to
about 2 MB although most of them are just around 5-50 KB. Most files
mostly grow at the end. The biggest files (500KB-2MB) are quite
long-lived and don't stop growing, again mostly at the end. Also,
about 2*5K files are each in the same directory, meaning that the tree
objects representing those 2 directories are big but changing only in
a few places.

I've now learned to avoid "git gc --aggressive". Perhaps there are
some other conclusions to be drawn, I don't know.

Christian.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]