Performance improvements for bzr-2.4 on large trees
John Arbash Meinel
john at arbash-meinel.com
Thu May 26 21:04:21 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/26/2011 10:36 PM, Eli Zaretskii wrote:
>> Date: Thu, 26 May 2011 21:31:31 +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 00h00m09.562s
>>> user 00h00m09.250s
>>> sys 00h00m00.296s
>>
>> bzr-history-db was an attempt to look at different storage techniques
>> for making log --include-merges faster. There is stuff we can do here,
>> but it is a fairly significant engineering effort. I can probably walk
>> you through installing it if you want to give it a try
>
> Please do, and thanks.
>
>> and you could feed back doc updates etc.
>
> Be happy to.
Basically, install the plugin like any other plugins. I think the
Windows installer might have a special system plugins directory, but
BZR_PLUGIN_PATH can be set, or you can use %APPDATA%/bazaar/2.0/plugins
Something like:
bzr branch lp:bzr-history-db history_db
You should be able to run its test suite with:
bzr selftest -s bp.history_db
You then need to tell it that you want it to start caching branches that
you care about. This can be set up globally, or just for specific
branches, etc, etc. But you can do something like:
bzr config history_db_path=C:/dev/historydb.db
You can use "bzr config --scope=???" to change where things get set. I
don't know bzr config very well. I just edit bazaar.conf if I want it to
apply to everything, and locations.conf if I want it to apply only in a
directory.
Once it is activated, it will trigger automatic importing for specific
commands. (post_branch_tip_changed, IIRC). However, for something like
emacs, you'll probably want to pre-load its database (by default it does
an 'incremental' build, which allows us to not grab all of history, but
is slower.)
You should be able to just run:
bzr history-db-create
It will churn for a bit (15-30s on my machine and an emacs branch, IIRC).
After it is done, it will have injected itself into specific branch
hooks, to make things like "get_dotted_revno()" [used by bzr log] much
faster.
It only affects things inspecting the revision graph. So it will make
looking up "-r X.Y.Z" faster, but it won't make "bzr status -r -10000"
faster.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk3ewFUACgkQJdeBCYSNAAPX5gCfaPNyURIUnyc5LMlUKbYNl2Kd
zxYAn0AP99GRFac1PZxmNXVVKRTXgiuw
=BDAy
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list