summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/event/attr.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/attr.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/attr.py')
-rw-r--r--lib/sqlalchemy/event/attr.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/event/attr.py b/lib/sqlalchemy/event/attr.py
index be2a82208..5e3499209 100644
--- a/lib/sqlalchemy/event/attr.py
+++ b/lib/sqlalchemy/event/attr.py
@@ -340,6 +340,8 @@ class _ListenerCollection(RefCollection, _CompoundListener):
class _JoinedDispatchDescriptor(object):
+ __slots__ = 'name',
+
def __init__(self, name):
self.name = name
@@ -357,6 +359,8 @@ class _JoinedDispatchDescriptor(object):
class _JoinedListener(_CompoundListener):
_exec_once = False
+ __slots__ = 'parent', 'name', 'local', 'parent_listeners'
+
def __init__(self, parent, name, local):
self.parent = parent
self.name = name