News for hackers. Stuff that matters.
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.
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.
Re:Decline of the Tornado Web Server - What happened? by tomwans on Friday December 10, 2010 @04:03PM (#1993174)
yeah, I didn't know HN still cared about Tornado. I thought I was the only one using it for production ...
Re:Decline of the Tornado Web Server - What happened? by BarkMore on Friday December 10, 2010 @06:34PM (#1993627)
You and FriendFeed, Hipmunk, Brizzly, Bitly (they recently built async mongodb driver for use with Tornado), Quora (for long polling), ...