[MERGE] 'bzr annotate' shows dotted revnos and --show-ids
John Arbash Meinel
john at arbash-meinel.com
Thu Dec 14 02:45:26 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> The attached patch updates 'bzr annotate' in 2 ways. First, it shows
> dotted revnos by default, instead of showing 'merge'. Second, it allows
> you to specify --show-ids and it will display revision ids instead of
> revnos.
>
This patch is an add-on to my earlier changes. It just changes the loop
so that if you use --show-ids, it fast-paths the annotation. In testing,
it changes the time to annotate all of bzrlib/builtins.py from 1.9s down
to 0.9s. So half of the time is spent in merge_sorted and pulling the
revision information out of revisions.knit.
So if you want a fast annotate 'bzr annotate --show-ids' is pretty darn
fast.
And according to --lsprof the bulk of the time is spent reading the
inventory.knit index and extracting the last committed inventory. (Under
- --lsprof the total time is 1.6s, and 1.17 of that is spent in
Repository.revision_tree(), and 1s of that is spent in
_KnitIndex.__init_() reading inventory.knit's index)
And a lot of the rest of the time is spent decoding the index entries.
We really should look into switching the internals to use revision_ids
as utf-8 strings, rather than Unicode strings.
We might also want to look into writing an alternative index format
which is tuned to be super fast to read. We have a small penalty in that
our revision ids are variable length strings.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFgLrFJdeBCYSNAAMRAuyhAJ9kodR10YKRixdGYgEmRnWbbKLfxQCgqV5e
5lpjw2uwikrnGlhpxc23BcQ=
=eiQy
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: annotate_show_ids_fast.patch
Type: text/x-patch
Size: 2890 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061213/f9450e9e/attachment.bin
More information about the bazaar
mailing list