diff options
author | Erik Johnston <erik@matrix.org> | 2016-03-23 16:54:59 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-03-23 16:54:59 +0000 |
commit | 647b041d1af28a04004cda42a354259ef7cdc479 (patch) | |
tree | dccf33e860071251238ccdf5c1b6dbab9270e6eb /synapse/storage/_base.py | |
parent | Merge pull request #664 from matrix-org/erikj/public_room_list (diff) | |
parent | Simplify intern_dict (diff) | |
download | synapse-647b041d1af28a04004cda42a354259ef7cdc479.tar.xz |
Merge pull request #666 from matrix-org/erikj/intern
Intern lots of strings
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 583b77a835..b75b79df36 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -18,6 +18,7 @@ from synapse.api.errors import StoreError from synapse.util.logcontext import LoggingContext, PreserveLoggingContext from synapse.util.caches.dictionary_cache import DictionaryCache from synapse.util.caches.descriptors import Cache +from synapse.util.caches import intern_dict import synapse.metrics @@ -350,7 +351,7 @@ class SQLBaseStore(object): """ col_headers = list(column[0] for column in cursor.description) results = list( - dict(zip(col_headers, row)) for row in cursor.fetchall() + intern_dict(dict(zip(col_headers, row))) for row in cursor.fetchall() ) return results |