Skip to content
Snippets Groups Projects
Commit c4b792fa109e authored by Jörg Sonnenberger's avatar Jörg Sonnenberger
Browse files

branchmap: avoid ancestor computations in absence of non-continous branches

The branchhead computation is one of the more heavy operations for
bigger repositories as it has to scan all changesets and potentially
involves the expensive computation of the ancestor sets. Redo the
computation to handle the common cases directly and use tighter
conditions for when the ancestor scan is necessary. Most importantly,
avoid it completely if the non-continous branches are processed in one
update as seen in the initial computation after a clone.

For the Mercurial repository, it gives a small 2-3% performance boost.
For the NetBSD test repository, it cuts the time in half.

Differential Revision: https://phab.mercurial-scm.org/D9631
parent 1cebad969d88
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment