[Python-Dev] extremely slow exit for program having huge (45G) dict (python 2.5.2)
M.-A. Lemburg
mal at egenix.com
Sat Dec 20 21:50:19 CET 2008
On 2008-12-20 21:20, Leif Walsh wrote:
> On Sat, Dec 20, 2008 at 3:04 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>> These long exit times are usually caused by the garbage collection
>> of objects. This can be a very time consuming task.
>
> In that case, the question would be "why is the interpreter collecting
> garbage when it knows we're trying to exit anyway?".
It cannot know until the very end, because there may still be
some try: ... except SystemExit: ... somewhere in the code
waiting to trigger and stop the system exit.
If you want a really fast exit, try this:
import os
os.kill(os.getpid(), 9)
But you better know what you're doing if you take this approach...
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Dec 20 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