[PATCH] Cache support for branch and pull
Aaron Bentley
aaron.bentley at utoronto.ca
Thu Jun 23 18:19:04 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I've implemented cache support for branch and pull. This means that
they will only download revisions and inventories once, and can take
full advantage of parallel or pipelined download to prevent latency from
slowing down downloads.
For the command bzr branch -r 100 http://bazaar-ng.org/bzr/bzr.dev
Before:
real 4m43.335s
user 0m3.710s
sys 0m0.560s
After:
real 2m55.654s
user 0m4.450s
sys 0m0.700s
And if you add async(see earlier posting), you get:
real 2m6.679s
user 0m4.440s
sys 0m0.590s
I've introduced a CachedStore wrapper, and a find_cached_branch that
substitutes a CachedStore for all the stores in a RemoteBranch.
CachedStore also introduces the "prefetch" method, which allows multiple
ids to be added to the cache before they're needed. update_revision now
uses "prefetch" if it's available.
Note that this cache is temporary, not a permanent, centralized cache.
Centralized caching would be easy to add, though.
I've attached the changes as one big patch, or you can go
revision-by-revision with
http://panoramicfeedback.com/opensource/bzr.precache/
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCuu8I0F+nu1YWqI0RAtAKAJ9faPDkWIvZgYoKK4FKFURFuuioBgCffgOp
CDWAtkjlhrFrW/rsQApF+yc=
=Cy21
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: precache.patch
Type: text/x-patch
Size: 8519 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050623/70c784d6/attachment.bin
More information about the bazaar
mailing list