CherryPy Performance

I’ve been a bit confused by the huge gap between the time per request that Apache’s mod_status is showing compared with CherryPy’s StatusTool. In some cases mod_status was showing that the requests were taking hundreds of times longer to complete than Status Tool was showing!

Of course mod_status will also be including network latency, so as an experiment I tried using wget locally however there was still a huge difference. I posted to the CherryPy mail list and got some advice pointing me to the WSGI code in CherryPy as being a likely culprit.

Normally this code is screaming-fast (1 ms or less) but with my multiple threads it seems to be slowing way down. Debugging this code is probably a bit beyond me so my plan is simply to bypass it completely and use mod_python instead.

I’ve been thinking about mod_python anyway, the only problem is that I’m going to have is that my present cache strategy will no longer work. I’m tempted to simply change the design of the homepage so that it’s much quicker to generate to remove the need to cache at all!

Leave a Reply

You must be logged in to post a comment.