Speedup with history-db

John Arbash Meinel john at arbash-meinel.com
Tue May 31 12:40:41 UTC 2011


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

On 5/27/2011 3:18 PM, Eli Zaretskii wrote:
>> Date: Fri, 27 May 2011 13:30:25 +0200
>> From: John Arbash Meinel <john at arbash-meinel.com>
>> CC: bazaar at lists.canonical.com
>>
>>>     D:\gnu\bzr\emacs\trunk>timep bzr log --include-merges -c104363 >nul
>>>
>>>     real    00h00m47.453s
>>>     user    00h00m45.125s
>>>     sys     00h00m02.125s
>>>
>>>     It takes 10.3s without history-db, so there's a 4.5 times
>>>     slowdown with the DB.  Why is that?
>>
>> I don't have a specific idea here, though we can investigate. "bzr
>> - --lsprof-file foo.txt" can be enlightening.
> 
> It looks like the reason has nothing to do with speed, it's the same
> or similar issue as with this command:
> 
>>>   . The output of "bzr log -n0 -r101290.1.25..101290.1.32" is
>>>     different with and without the plugin.
> 
> The problem is that with the plugin, the produced output is huge, I
> just didn't see it because I redirected it to the null device.
> Without the plugin, the command displays just this:
> 
>   D:\gnu\bzr\emacs\trunk>bzr --no-plugins log --include-merges -c104363
>   104363: Glenn Morris 2011-05-25 [merge] Merge from emacs-23; up to r100587.
>     99634.2.953: YAMAMOTO Mitsuharu 2011-05-25 Take account of periodic fringe..
>     99634.2.952: Kenichi Handa 2011-05-25 [merge] xdisp.c (get_next_display_el..
>       99634.12.18: Kenichi Handa 2011-05-25 [merge] merge emacs-23
>       99634.12.17: Kenichi Handa 2011-05-25 xdisp.c (get_next_display_element)..
>       99634.12.16: Kenichi Handa 2011-05-23 [merge] merge emacs-23
>       99634.12.15: Kenichi Handa 2011-05-23 [merge] merge emacs-23
> 
> which is what I'd expect.  With the plugin, it displays the same, but
> then goes on displaying all the rest of the revisions all the way to
> revno 1!  It's a small wonder that 16.6 seconds are taken by this:
> 
>      115006   0  16.6014      2.7581   <bzrlib\log.pyo>:1708(log_string)
> 
> So this change in the output of "bzr log" caused by the plugin is
> really something to look into.
> 

Looking at the code, I think this is only triggered when the
'stop_revision' is not a mainline. Certainly something that can be dug
into, but not a huge concern right now for me. I'll try to put in a hack
to at least fall back to the original if I can detect a case I don't handle.

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

iEYEARECAAYFAk3k4ckACgkQJdeBCYSNAAPg7ACfeKmQcwsM0Knyej3jWPHn4fPA
EaIAoJNFIHsDhQJ6e76uL6dGSdMdkA1X
=pmYG
-----END PGP SIGNATURE-----



More information about the bazaar mailing list