Gregor Horvath wrote:
Do you have a explanantion for that? Are my benchmarks wrong, or is it
just the thruth that under this circumstances cgi is as fast as webware.
You seem to be using the Python CGI adapter with Webware. Under this
circumstances, you will really see no difference.
CGI programs are slow, because they have to (1) create and destroy a
process and (2) start the Python interpreter every time they are used.
The Python CGI adapter (WebKit.cgi) shares both of these disadvantages
with ordinary CGI Python scripts.
Webware comes with an adapter written in C (wkcgi, WebKit.exe) that
eliminates problem (2) and is therefore much faster.
Webware also contains an Apache adapter written in C (webkit_mod) that
eliminates both problems (1) and (2).
I really recommend using webkit_mod with Webware. Note that there are
two different versions of the adapter, for Apache1.x and Apache2.x.
See also:
http://www.webwareforpython.org/Webware/WebKit/Docs/InstallGuide.html#adapters
Try to make another benchmark comparing the various adapters.
Concerning the benchmark, it also depends on how fast your servlet is.
If the time for starting new processes is short in comparison with the
time the servlet uses, then of course you will not measure the
performance of the web framework, but the performance of the CGI
programs themselves or the performance of the database.
But even if you use the Python CGI adapeter, Webware still has many
advantages over plain CGI. You can use the whole stuff the framework
provides. You can cache data more easily using Webware. This will often
make a big difference in performance.
-- Christoph
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss