Accelerate build_tree by using working tree files

Ian Clatworthy ian.clatworthy at internode.on.net
Fri Dec 21 02:27:35 GMT 2007


Aaron Bentley wrote:

> I think these are sub-optimal results, because AFAICT, you're running
> against a dirty dirstate.  _iter_changes should have no reason to call
> os.sha_file_by_name, because it should all be in dirstate.  But in fact,
> it's being called 37 667 times!

That's the number of (real) files in the tree. At that point in the
script, the only things that have been done are:

init repo
init
add
commit
cd ..
branch trunk fix

I don't have time right now to look any deeper as I have one or two
other things to wrap up before my break. Either commit isn't updating
the dirstate or the dirstate is being generated for the new branch, yes?
Can we and should we optimise the dirstate generation of the new branch
using information from the old one?

Ian C.



More information about the bazaar mailing list