[bzr-email:MERGE] special case logging a single non-merge revision
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 20 17:39:31 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
| 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
| =:->
I have been using this for a while, and it works really well for me. As
nobody else has vetoed it, I went ahead and pushed it to trunk.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhb3UMACgkQJdeBCYSNAAMtSwCfbeZ9PN3mi8y0bx6Y+WN5YFJc
qiAAn305wtFCU8ziaWiWkWGtpy8jCxMM
=4rYT
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list