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
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!