'bzr branch -r -XXX foo bar' slow for long histories

Robert Collins robertc at robertcollins.net
Tue Mar 18 03:00:17 GMT 2008


On Mon, 2008-03-17 at 21:43 -0500, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Aaron Bentley wrote:
> | Robert Collins wrote:
> |> On Sun, 2008-03-16 at 14:13 +0000, John Arbash Meinel wrote:
> |>> It also has the problem that our KnitPackRepositories don't cache any
> |>> parent information (I have a hack for maintaining the
> |>> CachingParentsProvider), which means it has to go back to the Index
> |>> each
> |>> time.
> |> The index caches the parents though; and it should not be bisecting on a
> |> lookup of a found key.
> |
> | My experience is that avoiding repeating the same node lookup is a
> | significant performance win.
> |
> | Aaron
> 
> Well, introducing the CachingParentsProvider in the first place was an enormous
> win for the places I was using it. So I'll have to agree.
> 
> Looking at --lsprof, we spend say 12s in _lookup_by... and only about 6s in
> _parse_lines. That was for something like 350k calls to _lookup_by and 6k calls
> to _parse_lines.

So, rather than caching the parents twice (GraphIndex,
CachingParentsProvider), lets just debug GraphIndex. 


350/6 ~= 59, so 12s:6s in 59:1, or lookup_by is about 6 times faster
than the parsing itself, but used way more frequently.

-Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080318/465b9996/attachment.pgp 


More information about the bazaar mailing list