[RFC/PLEASETEST] Per-file graph heads detection during commit for pack repositories.

Robert Collins robertc at robertcollins.net
Wed Nov 14 17:33:06 GMT 2007


On Wed, 2007-11-14 at 11:13 -0600, John Arbash Meinel wrote:


> I'm pretty sure this is incorrect. I just sent a email on this. If I add a
> cache of revision_id => parents for every call to get_parents() it changes the
> time from 73s down to 16s. (Note that it 3s for the file graph version you have.)

Oh, it saves time, just not because of IO. Dict lookups are /fast/.

> I agree about the separate calls issue. One thing I saw on the callgrind is
> that 50% of the time is spent in 'find_seen_ancestors'. Which is the call which
> cleans up the searcher whenever things are found to converge, IIRC.

yes. I have partial patches to tackle this, but not 'done'.

> I certainly thought it would be better if you had one logical graph that
> searchers interacted with. So they could label nodes that they reached, etc,
> rather than keeping their own sets/dicts of nodes. I haven't written the code,
> though, and IIRC Aaron felt that it was necessary to do it this way because of
> the state that they need to keep.

It's quite easy to split up 'advance' from 'what should I query' to
allow an external caller to call get_parents once per loop.

-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/20071115/b69ccc6a/attachment.pgp 


More information about the bazaar mailing list