BTree + CHK Inefficiencies
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 3 18:50:51 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> iii) Only cache the zlib compressed content. This is closer to 35
> bytes/record. Which is pretty optimal, but means any key that we
> actually want to read we still have to zlib.decompress().
> (TIMEIT says it takes 88us to decompress a 4k leaf node, if we
> did this for every key, that would be pretty bad. Maybe we could
> do "if I decompress 2x, then cache"...)
Note that _parse_leaf_lines to turn the decompressed string into actual
StaticTuple(string) objects is 111us per page. So zlib.decompress is a
fair portion of the overall time. And while 200us is pretty fast, when
you have 7k btree pages, that is still 1.4s total time.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxYVvsACgkQJdeBCYSNAAPVfACfck0us2BnS+8Ut/SdwqLzNMXx
PKQAmwbBGMLCFBogr5pJdNCvJD91OiRb
=KQwf
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list