summary refs log tree commit diff
path: root/synapse/util/__init__.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-09-14 12:50:06 -0400
committerGitHub <noreply@github.com>2020-09-14 12:50:06 -0400
commitaec294ee0d0f2fa4ccef57085d670b8939de3669 (patch)
treebe1bf0f3786c88287ef814b8434ae720058be1f9 /synapse/util/__init__.py
parentFix typos in comments. (diff)
downloadsynapse-aec294ee0d0f2fa4ccef57085d670b8939de3669.tar.xz
Use slots in attrs classes where possible (#8296)
slots use less memory (and attribute access is faster) while slightly
limiting the flexibility of the class attributes. This focuses on objects
which are instantiated "often" and for short periods of time.
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r--synapse/util/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index 60ecc498ab..d55b93d763 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -45,7 +45,7 @@ def unwrapFirstError(failure):
     return failure.value.subFailure
 
 
-@attr.s
+@attr.s(slots=True)
 class Clock:
     """
     A Clock wraps a Twisted reactor and provides utilities on top of it.