CherryPy with mod_python

I’ve not got a beta version of Fab Swingers running with CherryPy and mod_python and the results are absolutely fantastic! It’s given me more than a 100x increase in speed. One of the CherryPy guys suggested that it was because a thread bottleneck in CherryPy’s WSGI server which sounds sensible.

I haven’t really been doing proper releases of the code (I’m just using CVS checkouts) but I think that this will qualify as version 2.

I’ve now banished SQLObject in favour of handcrafted SQL, I’ve written a very fast database results to list of dictionaries method and I am now switching off the Python webserver in favour of mod_python.

I’m pretty happy now that I’ve got the technical cost at a sensible percent of revenue (about 2%) and I’m comfortable just to scale linearly from here.

Having said all of that I’m still going to bang away with further optimisations. There’s still quite a lot I can do, particularly on the templates (I could turn off useNameMapper and useAutocalling for example) and I should look at caching the expensive, frequently used content.

Leave a Reply

You must be logged in to post a comment.