Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Add __slots__ to ioloop._Timeout to reduce memory overhead when there…

… are

many pending timeouts.
  • Loading branch information...
commit e340491473498e7b67fd0e9e2e2a31d6b16ee20e 1 parent 33a587b
Ben Darnell authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 tornado/
4 tornado/
@@ -297,6 +297,10 @@ def _set_close_exec(self, fd):
class _Timeout(object):
"""An IOLoop timeout, a UNIX timestamp and a callback"""
+ # Reduce memory overhead when there are lots of pending callbacks
+ __slots__ = ['deadline', 'callback']
def __init__(self, deadline, callback):
self.deadline = deadline
self.callback = callback

0 comments on commit e340491

Please sign in to comment.
Something went wrong with that request. Please try again.