[MERGE] Reorganize TreeTransform inventory delta creation
Robert Collins
robertc at robertcollins.net
Wed Aug 13 03:38:58 BST 2008
On Tue, 2008-08-12 at 09:19 -0400, Aaron Bentley wrote:
> + for id_set in [self._new_name, self._new_parent,
> self._new_id,
> + self._new_executability]:
> + new_ids.update(id_set)
> + changed_kind = set(self._removed_contents)
> + changed_kind.intersection_update(self._new_contents)
> + changed_kind.difference_update(new_ids)
> + changed_kind = (t for t in changed_kind if
> self.tree_kind(t) !=
> + self.final_kind(t))
> + new_ids.update(changed_kind)
If self._removed_contents etc are dictionaries, you may find a
performance improvement by doing
changed_kind.intersection_update(frozenset(self._new_contents))
etc
Its weird I know, but AFAIK still the case in python.
bb:approve
--
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/20080813/884ae5a1/attachment.pgp
More information about the bazaar
mailing list