[Twisted-Python] How to improve response time of twisted.web?

glyph at divmod.com glyph at divmod.com
Fri Mar 28 02:27:36 EDT 2008

On 03:57 am, pbastov at gmail.com wrote:
>Thanks for the replies.
>In fact, I just tried to compare it against the static files -- almost
>the same result --
>a little bit faster, but far from Apache :(

Twisted is not, and has never been, as fast as Apache in this kind of 
naive raw-speed comparison on static files.  It's probably not as fast 
for most other things either.

If you would like to make it faster, there's no trick or configuration 
option or tweak.  The solution is simple: optimize the code.  This may 
just involve using a profiler and submitting patches, this may involve 
using some tool like cython or rpython to put the really critical parts 
into an extension module.  Nobody else has volunteered to do this so far 
because Twisted is, in fact, fast enough for most things :).

More information about the Twisted-Python mailing list