knit performance 1
Johan Rydberg
jrydberg at gnu.org
Wed Mar 8 15:18:12 GMT 2006
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.
~j
More information about the bazaar
mailing list