[MERGE] Refactor diffing
Aaron Bentley
aaron.bentley at utoronto.ca
Fri Nov 23 21:55:31 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Resending due to accidental paste.
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.646s
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
iD8DBQFHR0xT0F+nu1YWqI0RAu0KAJ9iC9xHBtQ8bmx/bccK4WtHEpgsiACfY1pQ
mSGfXhsnr/tWGdWVosmpCac=
=5p22
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list