Rev 4711: On, Key.intern() saves a little bit of memory in

John Arbash Meinel john at
Wed Sep 30 05:14:27 BST 2009


revno: 4711
revision-id: john at
parent: john at
committer: John Arbash Meinel <john at>
branch nick: 2.1-memory-consumption
timestamp: Tue 2009-09-29 23:14:22 -0500
  On, 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