[Twisted-Python] EXIT CGI kludge Sanity Check

Harald.Nyman at astrazeneca.com Harald.Nyman at astrazeneca.com
Fri Feb 13 03:44:49 EST 2004


We inherited this Apache/CGI app, with ~15 HTML pages, generated by CGI
Python scripts importing a ton of modules each time.
Not exactly lightning fast, plus the code's a total mix of Python with HTML
fragments :(

Awaiting a complete revamp of the app, we replaced Apache/CGI with a
threaded Twisted TCP server, sitting memory-resident with "everything"
imported, and sending back HTML as requested by javascript/tiny applet in
the browser. Form <INPUT>s and cookies are passed from javascript to Python
as text-represented dictionaries.
The modifications to the Python code were minor; the performance boost is
... dramatic (the users are cheering).

Comments? Anyone done something similar? What do we tell the purists?

Thanks,
Harald

_____________________________________________
Harald Nyman MSc, AstraZeneca Mölndal, Sweden






More information about the Twisted-Python mailing list