Merge eats memory
Michael Ellerman
michael at ellerman.id.au
Fri Jun 3 08:25:10 BST 2005
On Fri, 3 Jun 2005 15:40, Andrew Bennetts wrote:
> Here's a possible band-aid: it won't reduce the refcounts at all, but it
> should hopefully reduce the memory footprint a little, and reduce the
> number of object allocations Python does, by using __slots__.
>
> I'd be curious to know if you get a noticeable speed boost or drop in
> memory consumption from this. I suspect the benefit will be minimal, but
> it didn't take long to code :)
Wow.
Time:
with slots ~7m30s
without slots ~8m30s
Max memory usage:
with slots 62056 KB
without slots 115712 KB
References:
With slots:
Refcount Class
-------------------------------------------------------
36882 bzrlib.merge.SourceFile
36881 bzrlib.inventory.InventoryEntry
134 bzrlib.commands.Command
48 exceptions.Exception
34 random.Random
27 threading._Verbose
26 exceptions.StandardError
20 bzrlib.tree.Tree
17 exceptions.Warning
16 threading.Thread
Without slots:
Refcount Class
-------------------------------------------------------
55319 bzrlib.merge.SourceFile
55317 bzrlib.inventory.InventoryEntry
134 bzrlib.commands.Command
48 exceptions.Exception
34 random.Random
32 bzrlib.changeset.ChangesetEntry
28 bzrlib.changeset.ChangeUnixPermissions
27 threading._Verbose
26 exceptions.StandardError
20 bzrlib.tree.Tree
/me must read up on slots!
cheers
--
Michael Ellerman
IBM OzLabs
email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050603/045080c9/attachment.pgp
More information about the bazaar
mailing list