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

Adam Olsen rhamph at gmail.com
Sun Dec 21 19:44:12 CET 2008


On Sat, Dec 20, 2008 at 6:09 PM, Mike Coleman <tutufan at gmail.com> wrote:
> On Sat, Dec 20, 2008 at 5:40 PM, Alexandre Vassalotti
>> Have you seen any significant difference in the exit time when the
>> cyclic GC is disabled or enabled?
>
> Unfortunately, with GC enabled, the application is too slow to be
> useful, because of the greatly increased time for dict creation.  I
> suppose it's theoretically possible that with this increased time, the
> long time for exit will look less bad by comparison, but I'd be
> surprised if it makes any difference at all.  I'm confident that there
> are no loops in this dict, and nothing for cyclic gc to collect.

Try putting an explicit gc.collect() at the end, with the usual
timestamps before and after.

After that try deleting your dict, then calling gc.collect(), with
timestamps throughout.


-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-Dev mailing list