[Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)

M.-A. Lemburg mal at egenix.com
Mon Dec 22 22:07:38 CET 2008


On 2008-12-22 19:13, Mike Coleman wrote:
> On Mon, Dec 22, 2008 at 6:20 AM, M.-A. Lemburg <mal at egenix.com> wrote:
>> BTW: Rather than using a huge in-memory dict, I'd suggest to either
>> use an on-disk dictionary such as the ones found in mxBeeBase or
>> a database.
> 
> I really want this to work in-memory.  I have 64G RAM, and I'm only
> trying to use 45G of it ("only" 45G :-), and I don't need the results
> to persist after the program finishes.
> 
> Python should be able to do this.  I don't want to hear "Just use Perl
> instead" from my co-workers...  ;-)

What kinds of objects are you storing in your dictionary ? Python
instances, strings, integers ?

The time it takes to deallocate the objects in your dictionary
depends a lot on the types you are using.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Dec 22 2008)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2008-12-02: Released mxODBC.Connect 1.0.0      http://python.egenix.com/

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list