I routinely experience very poor behaviour of the auto garbage
collection both on the command line and especially with git gui (which
appears to have a much lower threashold).  I have a kernel git
repository I do most of my work in which includes a bunch of trees
including -next and which has some frequently rebased branches.  This
does garbage collection (or for git gui prompts me to do garbage
collection) far too frequently.  Previous analysis has shown that the
issue is that garbage collection leaves a bunch of unreferenced items
lying around as loose objects rather than in a pack waiting to age out
of the tree.  This is especially bad towards the end of the release
cycle when the trees in -next get bigger, right now the gc *always*
triggers.

It seems to me that it should be possible to trigger garbage collection
based on proportions of the number of objects in the repository rather
than on absolute numbers; some sort of time/object count increase based
holdoff might be useful to prevent things retriggering too soon.

Attachment: signature.asc
Description: Digital signature

Reply via email to