Re: Git is not scalable with too many refs/*
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2011, 19:42 UTC
- Message-ID
- <7vwrcleua9.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <201110031212.13900.mfick@codeaurora.org>
Martin Fick <mfick@codeaurora.org> writes:
Show 12 quoted lines
>> I guess this makes sense, we invalidate the cache and >> have to rebuild it after every new ref is added? >> Perhaps a simple fix would be to move the invalidation >> right after all the refs are updated? Maybe >> write_ref_sha1 could take in a flag to tell it to not >> invalidate the cache so that during iterative updates it >> could be disabled and then run manually after the >> update? > > Would this solution be acceptable if I submitted a patch to > do it? My test shows that this will make a full fetch of > ~80K changes go from 4:50min to 1:50min,
As long as the resulting code does not introduce new races with another process updating refs while the bulk update is running, I wouldn't have an issue with it.