Friday, August 8, 2008

NWSGI 0.4 Released

To coincide with the release of IronPython 2.0b4, NWSGI( has been updated to version 0.4. This version also brings improvements to configuration and performance.

Download NWSGI 0.4.


This version brings major improvements to configuration. Previously, the only way to configure NWSGI was to use some undocumented AppSettings parameters. Now there is a full ConfigSection that changing NWSGI's behaviour a breeze. More information on the new configuration options is available here.


Older versions on NWSGI rebuilt the ScriptRuntime and ScriptEngine on each request; this is extremely slow. Now, each the ScriptRuntime and ScriptEngine and created once and each request is executed in its own ScriptScope. This saves some work on each request, but it also means that imported modules are cached instead of reloaded on each request.

This has two consequences: requests are processed much quicker, but the server must be manually recycled/restarted if the Python code changes. As IronPython's Achilles heel is still the slow import of Python modules, this is a big win for performance, but it does slow down development and debugging.


I'll be doing some Django testing (as well as some other apps) on 2.0b4, and I hope to be able to post a workable patch for Django soon.