Garbage collection is used to remove data from a repository that is no longer referenced.
Generally this involves locking the repository and scanning all its branches then generating a new repository with less data.
A possibility to reduce this would be to have a set of grouped 'known garbage free' data - 'ancient history' which can be preserved in total should its HEADS be fully referenced - and where the HEADS list is deliberate cheap (e.g. at the top of some index).
possibly - null data in place without saving size.