'bzr branch' reads the same info multiple times

John Arbash Meinel john at arbash-meinel.com
Fri Nov 7 22:12:45 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

While tracking into the time spent for index work, I ran:

bzr -Dhttp -Dindex branch http://....

What I found rather enlightening, is that it seems we read all of the
- -format files 2 times.

This, along with accidentally reading the pack-names file 2x each time
we lock the repository, means it actually takes approx 10s just to get
to the point where we have opened the remote HTTP repo, and have the
repository locked, in preparation for the next step.

This means that of the 30s to update my branch 30% of it is just spent
getting a Branch & Repository object that it can use.


The other main inefficiency that I see is that when we find the
revisions, we don't hint to the inventory or the texts as to where the
entries are likely to be found.

So we search through all the .rix indexes to find where the Revision
texts are. And then once we find them, we search through all of the .iix
to find where the inventories are.

I think it is okay to have the code able to fall back to searching the
extra indexes, in case something isn't found. But it would be a good
step forward if we would at least search the matching indexes first.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkUvV0ACgkQJdeBCYSNAAPs2QCdHYD+J2tmViwg80Z/506BbTvl
k5sAoNhjZR+vXxNsF0kVP/epSS573lFz
=qYEa
-----END PGP SIGNATURE-----



More information about the bazaar mailing list