[RFC/performance] workingtree.commit

Robert Collins robertc at robertcollins.net
Wed Sep 6 08:11:23 BST 2006

Currently workingtree.commit does this:


This is a non-trivial performance issue.

AFAICT, after looking at it and discussing with Aaron on IRC we suspect
it is to ensure that the inventory in memory is synched with an
inventory that may have been diddled with by commit..

And indeed, in commit we do:
        if deleted_ids:
            for path, file_id in deleted_ids:
                del self.work_inv[file_id]

I'd like to change this to:

    if deleted_ids:
        for path, file_id in deleted_ids:
                [file_id, for path, file_id in deleted_ids])

which function would be defined as:
"""Remove the file_ids from the set of currently versioned files."""

This would not write the working inventory itself - at the same time I'd
put in place a small test in unlock() to write the _inventory if we know
its dirty.

This would allow removing that inventory-synchronising call from commit,
and remove one parse and one write from common-case commits.


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/20060906/0a966c04/attachment.pgp 

More information about the bazaar mailing list