Using emacs' unexec to speed Python startup (was Re: [Python-Dev] Startup time)
Barry Warsaw
barry@wooz.org
Sun, 18 May 2003 23:28:08 -0400
On Sunday, May 18, 2003, at 10:46 PM, Jeff Epler wrote:
> On Sun, May 18, 2003 at 08:22:14PM -0500, Jeff Epler wrote:
>> I'm running the test suite now .. it hangs in test_signal for some
>> reason.
>> test_thread seems to hang too, which may be related. (but
>> test_threading
>> completes?)
>
> If I make another change, to call PyOS_InitInterrupts just after
> Py_Initialize in Modules/main.c, these two tests pass.
>
> Py_Initialize believes it's already initialized so returns without
> doing
> anything. But unexec doesn't preserve signal handlers, so this must be
> re-done explicitly.
Y'know, I wrote that as a joke, and it's quite FAST that you've taken t
and made it real. Very cool too, congrats!
Since it looks like you implemented the meat of it as a module, I
wonder if it couldn't be cleaned up (with the interrupt reset either
pulled in the extension or exposed to Python) and added to Python 2.3?
-Barry