knit performance 1

Robert Collins robertc at robertcollins.net
Wed Mar 8 22:49:51 GMT 2006


On Wed, 2006-03-08 at 16:18 +0100, Johan Rydberg wrote:
> Robert Collins <robertc at robertcollins.net> writes:
> 
> > This is a knit performance improvement patch:
> >      def _add(self, version_id, lines, parents, delta):
> >          """Add a set of lines on top of version specified by parents.
> >  
> >          If delta is true, compress the text as a line-delta against
> >          the first parent.
> > +
> > +        Any versions not present will be converted into ghosts.
> >          """
> > -        if delta and not parents:
> > +        ghostless_parents = []
> > +        ghosts = []
> > +        for parent in parents:
> > +            if not self.has_version(parent):
> > +                ghosts.append(parent)
> > +            else:
> > +                ghostless_parents.append(parent)
> > +
> > +        if delta and not len(ghostless_parents):
> 
> Why call it ghostless_parents and not present_parents? 
> 
> Otherwise +1.

Good point, Changing :).

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: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060309/1abcacdd/attachment.pgp 


More information about the bazaar mailing list