Repository.add_revision() performance regression
ian.clatworthy at canonical.com
Thu Jun 12 05:39:23 BST 2008
I noticed last week during some profiling of bzr-fastimport
that a change we introduced in rev 3392 to repository.py (in
preparation for making rich-root-pack the default) was taking
85% of the total time required to do an import. Here is the
new bit of code (last 2 lines) taking the time ...
> if not revision_id in inventory_vf:
> if inv is None:
> raise errors.WeaveRevisionNotPresent(revision_id,
> # yes, this is not suitable for adding with ghosts.
> rev.inventory_sha1 = self.add_inventory(revision_id, inv,
> rev.inventory_sha1 = inventory_vf.get_sha1s([revision_id])
I've hacked around this in bzr-fastimport but it *may* still
be affecting other some operations, e.g. imports via
other plugins (like bzr-svn), commit and perhaps fetching via
I don't have a proposal for improving this yet - I approved
the patch that made the change so I know why it's important.
I did want to mention it though in case others are seeing
1.5 being slower on certain operations, particularly imports,
More information about the bazaar