summary refs log tree commit diff
path: root/synapse/http/federation
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/http/federation
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/http/federation')
-rw-r--r--synapse/http/federation/well_known_resolver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/http/federation/well_known_resolver.py b/synapse/http/federation/well_known_resolver.py
index e6f067ca29..a306faa267 100644
--- a/synapse/http/federation/well_known_resolver.py
+++ b/synapse/http/federation/well_known_resolver.py
@@ -311,7 +311,7 @@ def _parse_cache_control(headers: Headers) -> Dict[bytes, Optional[bytes]]:
     return cache_controls
 
 
-@attr.s()
+@attr.s(slots=True)
 class _FetchWellKnownFailure(Exception):
     # True if we didn't get a non-5xx HTTP response, i.e. this may or may not be
     # a temporary failure.