"bzr log" by revision-id is slow

Eli Zaretskii eliz at gnu.org
Wed Oct 12 22:18:24 UTC 2011


It looks like "bzr log -r REVID" is O(1), but with a very large
constant.  The time is roughly the same as it takes "bzr
revision-info" to return the revno by revision-id.

Here are a few examples from the Emacs repository, which show that the
time taken by "bzr log -r REVNO" grows for older revisions, but the
same command by REVID takes constant time, which happens to be the
same as for "bzr log -r 1".

Is this expected?

  D:\gnu\bzr\emacs\trunk>timep bzr log -r-2
  106069: Stefan Monnier 2011-10-12 * doc.c (get_doc_string): Encode file name.

  real    00h00m00.625s
  user    00h00m00.390s
  sys     00h00m00.187s

  D:\gnu\bzr\emacs\trunk>bzr lookup-revision 106069
  monnier at iro.umontreal.ca-20111012190804-frm225b6jckvaj7k

  D:\gnu\bzr\emacs\trunk>timep bzr log -r monnier at iro.umontreal.ca-20111012190804-frm225b6jckvaj7k
  106069: Stefan Monnier 2011-10-12 * doc.c (get_doc_string): Encode file name.

  real    00h00m19.140s
  user    00h00m18.640s
  sys     00h00m00.421s

  D:\gnu\bzr\emacs\trunk>timep bzr log -r cyd at stupidchicken.com-20090609183929-nuq8sa1d8pep960t
  96032: Chong Yidong 2009-06-09 * ada-mode.texi (Installation, Compile commands)

  real    00h00m19.265s
  user    00h00m18.796s
  sys     00h00m00.390s

  D:\gnu\bzr\emacs\trunk>timep bzr revision-info cyd at stupidchicken.com-20090609183929-nuq8sa1d8pep960t
  96032 cyd at stupidchicken.com-20090609183929-nuq8sa1d8pep960t

  real    00h00m19.187s
  user    00h00m18.828s
  sys     00h00m00.296s

  D:\gnu\bzr\emacs\trunk>timep bzr log -r 96032
  96032: Chong Yidong 2009-06-09 * ada-mode.texi (Installation, Compile commands)

  real    00h00m02.750s
  user    00h00m02.406s
  sys     00h00m00.312s

  D:\gnu\bzr\emacs\trunk>timep bzr log -r 1
  1: Jim Blandy 1985-04-18 entered into RCS

  real    00h00m20.828s
  user    00h00m19.218s
  sys     00h00m00.609s

  D:\gnu\bzr\emacs\trunk>timep bzr log -r jimb at redhat.com-19850418004829-3xjfpek0kofyaf5q
  1: Jim Blandy 1985-04-18 entered into RCS

  real    00h00m19.968s
  user    00h00m19.343s
  sys     00h00m00.546s



More information about the bazaar mailing list