On Tuesday 20 September 2005 08:50, Gregor Horvath wrote: > Hi, > > I am evaluationg using Webware instead of plain python CGI. [...] > > def testcgi(): > for i in range(100): > u.urlopen("http://localhost/cgi-bin/perftestcgi.py") > > def testwebware(): > for i in range(100): > u.urlopen("http://localhost/cgi-bin/WebKit.cgi/perftest.py")
As long as you invoke Webware with the CGI adapter, you can't see any speed improvement over plain CGI. From the docs (http://www.webwareforpython.org/Webware/WebKit/Docs/InstallGuide.html#python-cgi-adapter) -------------------------------------------------------------------------------------------------------------------- Though it's not recommended, there is an equivalent CGI script written in Python. This script is substantially slower, as it requires a Python interpreter to be started for each request. It is located in WebKit/Adapters/WebKit.cgi -- you may wish to point the first line (#!/usr/bin/env python) to the actual path of the Python interpreter (e.g., #!/usr/local/bin/python). Otherwise, follow the instructions for wkcgi. There is no configuration, and WebKit.cgi should be able to find the host and port of the AppServer automatically. ------------------------------------------------------------------------------------------------------------------------ Please try mod_webware as an adapter as it is the fastest way to connect to a webware application server. Hope that helps Stephan > > def testpsycopg(): > for i in range(100): > c = psycopg.connect("dbname=timcos_0") > os.popen2("python") > c.close() > > profile.run("testcgi()") [...] ------------------------------------------------------- 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