[bzr-email:MERGE] special case logging a single non-merge revision

John Arbash Meinel john at arbash-meinel.com
Thu Jun 5 18:51:28 BST 2008


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

Now that we've been tuning stuff like 'bzr commit' for performance, I'm noticing
that a good portion of the time spent in every commit is in 'bzr-email'. I broke
it down into something like:

~  1.25s smtplib.starttls()
~  1.02s smtplib.connect()
~  2.00s show_log()

There isn't a lot I can do about the time it takes to connect and start a tls
connection. I did notice that it is a bit faster if I connect directly to the
mail server, rather than going through an ssh tunnel. (of course, if I was going
through an ssh tunnel, I wouldn't need starttls, but ...)

Anyway, this patch just special cases when there is a single revision to be
displayed (no merges). We know we don't have dotted revnos, we already know the
revno, etc.

The patch is pretty small, and it cuts of 2 seconds during 'bzr commit'.
Originally, I thought we could do the special casing in 'show_log', but that
adds a lot of complexity for a rare use case. (It is quite common for bzr-email,
but not for 'bzr log'.)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhIJ6AACgkQJdeBCYSNAAOqaQCgtug58Gb/7Cl16ek1VGpS9Sls
jFIAoJhOBRoAD/C3Y1ELpoYXlxhB2CMB
=FQDx
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: email-quick-log.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080605/d383cb11/attachment.diff 


More information about the bazaar mailing list