CGI speedup strategies

Ian Clarke I.Clarke at strs.co.uk
Wed Sep 1 04:46:01 EDT 1999


I have always been dissatisfied with the way that CGI scripts work,
loading the interpreter and then the script, not to mention making SQL
connections, loading databases etc - and this for *each and every*
access.  Ok, software like modpython (or is is pyApache?) allieviates
some of this overhead, but it is still far from ideal.

Has anyone tried actually implementing a Python webserver which just
starts a new thread and runs a piece of Python code in it every time
someone makes a HTTP request?  This server could then cache any objects
(such as files, or SQL connections) in memory to be used by any Python
scripts (this would obviously require all code to be thread-safe).

Can anyone think of any problems with this technique?

Ian.

-- 
Ian Clarke -                    http://www.gnu.demon.co.uk/
"A subversive is anyone who can out-argue their government"




More information about the Python-list mailing list