Re:Decline of the Tornado Web Server - What happened?
by bdarnell on Friday December 10, 2010 @04:01PM
(#1993162)
Wow, didn't expect this to make the front page of HN. There's more context in the groups thread (http://groups.google.com/group/python-tornado/browse_thread/...), but the short version is that a change to abstract away some error handling with the python 'with' statement had a surprising performance impact. When used with the @contextlib.contextmanager decorator, the with statement is more than 25 times as expensive as a try/except statement.
[ Parent
| on HN ]
Re:Decline of the Tornado Web Server - What happened?
by petdog on Friday December 10, 2010 @05:38PM
(#1993474)
It looks like you forgot to call the function in 'simple_catch'. Interestingly, if you do, manual_with_catch will actually be faster in the failing case. (A try:fn() finally: return True beats everything else in the failing case)
Re:Decline of the Tornado Web Server - What happened?
by bdarnell on Friday December 10, 2010 @05:59PM
(#1993544)
Ah, that makes a big difference. Thanks for the correction.