[mod_python] does mod_python is ready for production env. ?

Gustavo Córdova Avila gustavo.cordova at q-voz.com
Tue Dec 2 15:28:00 EST 2003


Michael S. Fischer wrote:

> Michael C. Neel wrote:
>
>> In my personal tests, I found mod_python right behind mod_perl in terms
>> of speed and ahead of php.
>
> Did you try the Zend Accelerator module for PHP?  When used, it makes 
> PHP an order of magnitude faster.  I'm not kidding.  Simply blows 
> mod_perl/mod_python away.
>
> Of course, the upshot is that you'd have to program in PHP to use it :-)
>
> Grisha, it might be an interesting future addition to mod_python to 
> cache compiled Python code and access the compiled code via shared 
> memory like the Zend Accelerator does -- if that's even possible with 
> the Python architecture.
>
> --Michael

You can do something even better from Python, just:

    import psyco
    psyco.profile()

and it'll automatically do some background profiling, and generate 
specialized machine code for any functions worth compiling.  Another 
common invocation is:

    import psyco
    psyco.bind(func1)
    psyco.bind(func2)
    ...

This is when you know which functions are worth compiling, so you 
generate specialized versions immediately, upon module startup.

Psyco's a really nice gem, you can check it out at:

    http://psyco.sourceforge.net/

-gustavo




More information about the Mod_python mailing list