Improving interpreter startup speed

durumdara at durumdara at
Mon Oct 27 09:20:56 CET 2008

To make faster python, you can do:

1.) Use mod_python, and not cgi.
2.) Use other special python server that remaining in memory, and call 
it from compiled C code. For example, the C code communicate this server 
with pipes, tcp, (or with special files, and the result will come back 
in other file).
You can improve this server when you split threads to python 
subprocesses, and they still alive for X minutes.
You have one control process (py), and this (like the apache) 
communicate the subprocesses, kill them after timeout, and start a new 
if needed.


James Mills írta:
> On Mon, Oct 27, 2008 at 5:46 PM, Gabriel Genellina
> <gagsl-py2 at> wrote:
>>> +1 This thread is stupid and pointless.
>>> Even for a so-called cold startup 0.5s is fast enough!
>> I don't see the need to be rude.
>> And I DO care for Python startup time and memory footprint, and others do
>> too. Even if it's a stupid thing (for you).
> I apologize. I do not see the point comparing Python with
> RUby however, or Python with anything else.
> So instead of coming up with arbitary problems, why don't
> we come up with solutions for "Improving Interpreter Startup Speeds" ?
> I have only found that using the -S option speeds it up
> significantly, but that's only if you're not using any site
> packages and only using the built in libraries.
> Can be improved ?
> --JamesMills

More information about the Python-list mailing list