[MERGE] Make pulling bundle 6x faster

Aaron Bentley aaron.bentley at utoronto.ca
Tue Jul 24 18:29:44 BST 2007


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

Hi all,

This patch makes it 6x faster to pull a bundle, by
1. re-using the matching_blocks info from the multiparent deltas in the
   bundle
2. greatly increasing the amount of batching performed by add_mpdiffs
3. getting mpdiff.get_line_list to properly take advantage of cached
   versions
4. changing the BundleReader source file from an IterableFile to a
   cStringIO.

It is now possible to pull the first 1000 revisions of bzr from a bundle
in 10 seconds.  This formerly took 64 seconds.

Step 4 may be the most controversial, so I made it optional.  When
applying a bundle from a merge directive, the merge directive must
already contain the in memory, so using a cStringIO to hold the
bzip-decoded file doesn't dramatically increase memory use.

But by default, an interablefile will be used.

It probably makes sense to investigate speeding up IterableFile, but a
good 20s was being spent reading from it, so avoiding it in the meantime
seems sensible.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGpjcI0F+nu1YWqI0RAg3WAJ4oWLsVistSrsnz2jhdiR2LtR55GQCfW8i9
Q8D6IBIMRMXiG/f+XpmbXMo=
=8F+M
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fast-bundle.patch
Type: text/x-patch
Size: 32087 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070724/c4e1c818/attachment-0001.bin 


More information about the bazaar mailing list