I had a brief discussion with the guys on #python --- <seiflotfy> can u explain to me why inheriting from object with __slots__ uses less memory than inheriting from list? make it for dummies so i can explain it to my team
<verte> seiflotfy: do you know what a struct looks like in memory? <seiflotfy> verte, nope <verte> seiflotfy: __slots__ is exactly that. on some implementations of python, the object literally has one pointer for each field. there's no dict hanging about to store attributes. <seiflotfy> so the statement is true then ? <nedbat> seiflotfy: the statement about __slots__ reducing memory? Yes, that was a major goal of __slots__. <verte> seiflotfy: oh, yes. if you need methods on what would otherwise be a tuple, and you expect to have lots of those objects, __slots__ may be a good idea. -- You received this bug notification because you are a member of Zeitgeist Extensions, which is the registrant for Zeitgeist Extensions. https://bugs.launchpad.net/bugs/624310 Title: Large requests increase memory usage considerably Status in Zeitgeist Framework: Confirmed Status in Zeitgeist Extensions: New Bug description: I'm seeing with standalone Sezen that after running it, mem usage of the zeitgeist-daemon process goes up from ~13MB to ~40MB, this is understandable as when Sezen is starting, it does one big query where it asks for everything grouped by most recent subjects and in my case this returns ~11 thousand events, so the extra 30MB can be explained by allocating memory for the DBus reply. Still, my question is whether Zeitgeist should be at mercy of the applications, where nothing prevents them from spiking the memory usage of the core process. (I already saw a couple of times zeitgeist using 80-100MB of memory on my system). Perhaps there's a way to tell python dbus to free its buffers? _______________________________________________ Mailing list: https://launchpad.net/~zeitgeist Post to : [email protected] Unsubscribe : https://launchpad.net/~zeitgeist More help : https://help.launchpad.net/ListHelp

