Memory Consumption for 'bzr co' [was Re: Work flow on large repositories]
Andrew Bennetts
andrew.bennetts at canonical.com
Tue Aug 3 14:42:21 BST 2010
John Arbash Meinel wrote:
[...]
> And finally, back to CHKInventory (excluding the chk_bytes repository
> objects)
> >>> summarize_refs(chki, excluding=[chk_bytes.address])
> Total 1231512 objects, 16 types, Total size = 107.6MiB (112783517 bytes)
> Index Count % Size % Cum Max Kind
> 0 654339 53 80479605 71 71 536 str
> 1 51514 4 15394232 13 85 1573004 dict
> 2 65581 5 4721832 4 89 72 InventoryFile
> 3 69639 5 3744212 3 92 208 unicode
> 4 186732 15 3266268 2 95 20 StaticTuple
> 5 47122 3 2827320 2 97 60 LeafNode
> 6 152186 12 1826232 1 99 12 int
> 7 4058 0 503192 0 99 124 CHKInventoryDirectory
>
> So 65k files, and 4k directories, or roughly 70k total entries.
Coincidentally, I noticed tonight that various InventoryEntry subclasses had
much larger __slots__ than necessary. I've just made a patch that (on 32-bit
systems) trims InventoryFile from 68 to 40 bytes, and CHKInventoryDirectory from
120 to 48 bytes. That's only 2MB of that 107, but it's a cheap win.
The patch is
<https://code.launchpad.net/~spiv/bzr/smaller-inventory-entries/+merge/31636>.
-Andrew.
More information about the bazaar
mailing list