On May 7, 2008, at 1:11 AM, Max Ischenko wrote:

I'm debugging performance issues with my Pylons app and got some weird data.

Measured with ApacheBench, frontpage is served 44 req/s when accessed with /root/index and 5 req/s when accessed through /.

How's that? I suppose it should be the same, I don't think my routes *that* complicated. ;)

Do you have the Cascade middleware in your middleware.py? It might be doing more searches for / and not /root/index. Routes itself I've benchmarked at about 18k matches per second with a fairly large set of Routes on a few year old machine. The matching algorithm is very simple, there's a list of regexp, and it tries them in order with the URL until one matches. That's why its more like the Cascade and StaticURLParsers is affecting the speed rather than Routes.

If this is a deployment test, remove the Cascade middleware entirely, and serve the static files with apache or nginx, etc.

Cheers,
Ben

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to