Re: Memory footpring of python objects

2009-04-23 Thread Nick Craig-Wood
BlueBird wrote: > I have a program that manages several thousands instances of one > object. To reduce memory > consumption, I want of course that specific object to have the > smallest memory footpring possible. > > I have a few ideas that I want to experiment with, like using > __slots__,

Re: Memory footpring of python objects

2009-04-22 Thread BlueBird
On 22 avr, 11:56, Steven D'Aprano wrote: > On Wed, 22 Apr 2009 02:30:32 -0700, Chris Rebert wrote: > > On Wed, Apr 22, 2009 at 2:24 AM, BlueBird wrote: > > >> Hi, > > >> I have a program that manages several thousands instances of one > >> object. To reduce memory > >> consumption, I want of cour

Re: Memory footpring of python objects

2009-04-22 Thread Steven D'Aprano
On Wed, 22 Apr 2009 02:30:32 -0700, Chris Rebert wrote: > On Wed, Apr 22, 2009 at 2:24 AM, BlueBird wrote: >> >> Hi, >> >> I have a program that manages several thousands instances of one >> object. To reduce memory >> consumption, I want of course that specific object to have the smallest >> mem

Re: Memory footpring of python objects

2009-04-22 Thread Marco Mariani
BlueBird wrote: I have a program that manages several thousands instances of one object. To reduce memory consumption, I want of course that specific object to have the smallest memory footpring possible. Have you thought of using something like the flyweight pattern and a compact data repres

Re: Memory footpring of python objects

2009-04-22 Thread Chris Rebert
On Wed, Apr 22, 2009 at 2:24 AM, BlueBird wrote: > > Hi, > > I have a program that manages several thousands instances of one > object. To reduce memory > consumption, I want of course that specific object to have the > smallest memory footpring possible. > > I have a few ideas that I want to expe

Memory footpring of python objects

2009-04-22 Thread BlueBird
Hi, I have a program that manages several thousands instances of one object. To reduce memory consumption, I want of course that specific object to have the smallest memory footpring possible. I have a few ideas that I want to experiment with, like using __slots__, using a tuple or using a dict.