B+tree discussions
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 3 18:15:36 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
...
| I'm starting to wonder if we want to think about 'intern()'ing our
| tuples. Especially since the it seems that key will be repeated fairly
| often. Almost 1/2 of our per-row overhead is just memory for the tuple
| objects. And certainly there is a lot of plain python object memory
| overhead.
|
| John
| =:->
Unfortunately, tuple objects don't support weakref, so the simple method
of using a WeakKeyDictionary isn't going to work. (I don't know if it
would strictly work anyway, or if the target referencing itself would
cause a problem.)
We might be able to do it with our own custom data structures, but
ultimately we want to let go of the tuples when they are no longer
referenced, which is difficult to do.
I suppose we could do it at the level of reading 1 page, which would
probably help.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhtCTgACgkQJdeBCYSNAANwPQCeOT49ZcQreGDoPgHFO9QdpUnf
zDMAoKBfxyEZH1SdpCn3VVHYLeI2Q/Ad
=CHSS
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list