[MERGE] KVF.get_record_stream('unordered') uses I/O order

John Arbash Meinel john at arbash-meinel.com
Thu Dec 4 21:00:51 GMT 2008


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

The current get_record_stream() implementation just returns records in
iter(dict) order if it gets 'unordered'. This is rather sub-optimal,
because it means we will read randomly between all pack files and in
random order.

The attached patch sorts based on 'index_memo', which turns out to both
group by pack file *and* sort in forward I/O order. (For knits it sorts
by the 'prefix' of the key, which is file_id, and thus groups per .knit
file.)

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

iEYEARECAAYFAkk4RQMACgkQJdeBCYSNAAPWIgCgx98r5H4fzF1oEYhj6M2/7EZA
kL8AoLe/YBVdyPgcVFjDdoSnCatwjTKn
=cG/j
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sorted_get_record_stream.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20081204/06ca0697/attachment.diff 


More information about the bazaar mailing list