[MERGE] Refactor diffing

Aaron Bentley aaron.bentley at utoronto.ca
Fri Nov 23 21:53:36 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Fri, 2007-11-23 at 14:43 -0500, Aaron Bentley wrote:
>> Okay, actually this is marked as a high-priority bug, so maybe it should
>> go into 1.0:

> My thoughts are:
>  - is it faster (that is, on (say) bzr.dev, what is the time to do a
> diff with just a couple of text files changes, with and without the
> patch. Thats the sort of scenario that that bug refers to.

The patch makes it slower;
Without patch (best time):
real    0m0.627s
user    0m0.524s
sys     0m0.088s


With patch (best time):
real    0m0.646sI'm getting some strange readings from the LSProf data.
 AFAICT, it claims that WorkingTree4._get_inventory is being called by
Tree.id2path.  Which makes no sense, given that id2path is implemented
on WorkingTree4.

user    0m0.540s
sys     0m0.100s

or 1.03x slower.

The inventory is still used, but it's an implementation detail of
Tree.id2path (DirStateRevisionTree does not provide a customized
implementation of id2path AFAICT).

According to lsprof: 41% of the time is spent retrieving revisions for
get_file_mtime.

For the old version, that's 52%.

The old version spends 5.23% of its time retrieving the inventory for
id2path.

The new version spends 4.05% of its time retrieving the inventory for
id2path.

Anyone feel like implementing id2path on DirStateRevisionTree?

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHR0vg0F+nu1YWqI0RAmhUAJ9taCmhEL4dE3GrxtM0wvaNtRox1ACfSxQ6
tCMf1VBl9ude8MnHkC71BYQ=
=iF95
-----END PGP SIGNATURE-----



More information about the bazaar mailing list