Rev 4711: On bzr.dev, Key.intern() saves a little bit of memory in http://bazaar.launchpad.net/~jameinel/bzr/2.1-memory-consumption

John Arbash Meinel john at arbash-meinel.com
Wed Sep 30 05:14:27 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-memory-consumption

------------------------------------------------------------
revno: 4711
revision-id: john at arbash-meinel.com-20090930041422-rm1v1u1yzfrabjtv
parent: john at arbash-meinel.com-20090929215131-4ddlo63wgvgnjpic
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-memory-consumption
timestamp: Tue 2009-09-29 23:14:22 -0500
message:
  On bzr.dev, Key.intern() saves a little bit of memory
  we get 107.5MB peak vs 110.4MB peak w/ 6MB for the interned dict.
  However, for lp it is a wash. 293.5MB peak both ways, with 24MB in the intern dict.
  Then again, if we shrink the intern dict, we can get down to at least 1/3rd the size,
  and possibly more depending on whether the dict is using 4:1 vs 2:1 packing. It should
  be using 2:1, though, since there are 792k entries. (vs 522k string entries....)
  We might also consider only interning the Key if the key width is 1.
  
  It makes sense for sha1 keys, though we would lose a little bit for revisions => inventories
  => file_keys.
  However, since sha1 keys are 425k out of all 792k keys, it might be worth investigating.
  Note that if we get the chk_map deserializer et al using Key as well, that will
  help get some common references in the inventory parsing code.
-------------- next part --------------



More information about the bazaar-commits mailing list