[Tutor] Using jon.fcgi to speed up subsequent invocations

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Fri Aug 15 13:46:48 EDT 2003



On Fri, 15 Aug 2003, Jonathan Hayward http://JonathansCorner.com wrote:

> I have a search script that spends 90+% of its time in initialization.
> One initialisation gets everything ready for multiple searches, so it
> should speed up with fast cgi. I converted, or tried to convert it, to
> jon.fcgi to use Fast CGI.

Hi Jonathan,


You may want to try mod_python instead:

    http://www.modpython.org/


> As is, I can't tell a performance difference. If I load the larger
> dataset, a search takes ~20 seconds with or without fcgi. Do I need to
> tell Apache something different to use it as a FastCGI script (what's
> the URL to the relevant HOWTO)?


Yes, there's some extra setup that needs to be done to make Python treat
it as a FastCGI.  It looks like you may need to add a handler block in
Apache's httpd.conf.  Here's a LinuxWorld article that shows how to set it
up:

    http://www.linuxworld.com/story/32798.htm


It might be a good idea to check with the folks on comp.lang.python to see
how FastCGI and mod_python compare.  I had the impression that mod_python
was very well supported and actively developed.  But I'm a lot more
ignorant about FastCGI.  I tried connected to:

    http://www.fastcgi.com/

but the site appears to be down at the moment.  Stupid power outages...
*grin*



Good luck to you!




More information about the Tutor mailing list