Performance Fix: Minimize number of advertisedHaves
While we set up hooks in ReceiveCommits to minimize the number of
advertised refs (for instance filtering out refs/changes and
refs/cache-automerge refs), their objectIds will still be added to
BaseReceivePack.advertisedHaves (JGit), leading to an unnecessarily
complex commit graph for JGit to traverse when checking for commit
connectivity in BaseReceivePack.checkConnectivity().
By filtering the refs before the objectIds are added to advertisedHaves,
lots of time can be saved when pushing to complex Gits.
Push times for one of our Gits (warm caches):
This Git has around 90k change/ps refs.
1 file changed