python shutting down sloooooooowly/tuning dictionaries

Brian Quinlan brian at sweetapp.com
Wed Apr 21 12:12:15 EDT 2004


> Since the entire database is too large I typically run the same
> program 10-100 times on smaller parts. The annoying bit is that the
> time for finishing one instance of a program before starting the next
> instance can take a lot of time.  I have started using a shell script to
> check whether certain files have been written and then kill the
> program from the os to speed up everything. But this solution is way 
> too ugly. There should be a better way, but I don't seem to be able to
> find one.

You might try disabling garbage collection using the gc module when you 
your application is done. Explicitly closing any files bound to globals 
might then be a good idea.

Cheers,
Brian





More information about the Python-list mailing list