[MERGE] 40% faster partial commits

Robert Collins robertc at robertcollins.net
Thu Sep 20 10:39:52 BST 2007


On Thu, 2007-09-20 at 19:05 +1000, Ian Clatworthy wrote:
> I'm 85% of the way through reviewing this and all looks good so far.
> commit.py to be completed and I want to do that in the morning (when my
> mind is fresher).
> 
> Comments so far below.
> 
> bb:comment
> 
> > +    search_paths = set()
> > +    paths = set(paths)
> > +    for path in paths:
> > +        other_paths = paths.difference(set([path]))
> > +        if not is_inside_any(other_paths, path):
> > +            # this is a top level path, we must check it.
> > +            search_paths.add(path)
> > +    return search_paths
> 
> difference takes an iterable so no need for set([path]). Just [path]
> ought to do.

This was just moved from the working tree 4 iterator; I don't recall if
I performance profiled it or not, but that code *has* been profiled
within an inch of its life; I'm inclined to err on 'leave as is' for
now, but as its not in an inner loop it shouldn't matter.

-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/20070920/01c12f8c/attachment.pgp 


More information about the bazaar mailing list