[ILUG] IPC and CGI

Michael Thompson michaelnt at gmail.com
Thu Apr 7 16:47:51 IST 2005


On Apr 7, 2005 2:53 PM, Dale Dunlea <daledunlea at commergy.com> wrote:
> Hi All,
> 
> I have a CGI script. It's python, but I'm not set in stone on this.
> Anyway, it has to parse a reasonably large, and largely static, file at
> startup before doing its thing. The problem is that the file it must
> parse is likely to grow over time, and will get quite large. Which means
> that parsing it every time the CGI scripts gets run is going to be
> arduous and may become unacceptably slow.

I'd second the suggestion to use a database backend, but to answer your 
question mod_python should solve some of your problems:

Mod_python is an Apache module that embeds the Python interpreter within the 
server. With mod_python you can write web-based applications in Python that 
will run many times faster than traditional CGI and will have access to 
advanced features such as an ability to retain database connections and 
other data between hits and access to Apache internals



More information about the ILUG mailing list