summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event/registry.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-01-04 01:53:42 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-01-04 01:53:42 -0500
commit315db703a63f5fe5fecf6417f78ff513ff091966 (patch)
treee7cec92b6fae3c9c0f6e717acaa8fdde5ce780f6 /lib/sqlalchemy/event/registry.py
parentb1928d72098dd68c8aba468d94407f991f30d465 (diff)
downloadsqlalchemy-slots.tar.gz
- start trying to move things into __slots__. This seems to reduce theslots
size of the many per-column objects we're hitting, but somehow the overall memory is hardly being reduced at all in initial testing
Diffstat (limited to 'lib/sqlalchemy/event/registry.py')
-rw-r--r--lib/sqlalchemy/event/registry.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/event/registry.py b/lib/sqlalchemy/event/registry.py
index 5b422c401..fc26f91d7 100644
--- a/lib/sqlalchemy/event/registry.py
+++ b/lib/sqlalchemy/event/registry.py
@@ -140,6 +140,10 @@ class _EventKey(object):
"""Represent :func:`.listen` arguments.
"""
+ __slots__ = (
+ 'target', 'identifier', 'fn', 'fn_key', 'fn_wrap', 'dispatch_target'
+ )
+
def __init__(self, target, identifier,
fn, dispatch_target, _fn_wrap=None):
self.target = target