diff options
author | Erik Johnston <erik@matrix.org> | 2017-02-28 14:37:29 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-02-28 14:38:16 +0000 |
commit | b84907bdbbc70ede585f65ee092fe0e2013f0d5d (patch) | |
tree | fcc49ef880e862489459967e3f5a03ff82a5accc | |
parent | Fix up txn name (diff) | |
download | synapse-b84907bdbbc70ede585f65ee092fe0e2013f0d5d.tar.xz |
Intern table column names once
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/_base.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 557701d0c4..4410cd9e62 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -18,7 +18,6 @@ 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 from synapse.storage.engines import PostgresEngine import synapse.metrics @@ -356,9 +355,9 @@ class SQLBaseStore(object): Returns: A list of dicts where the key is the column header. """ - col_headers = list(column[0] for column in cursor.description) + col_headers = list(intern(column[0]) for column in cursor.description) results = list( - intern_dict(dict(zip(col_headers, row))) for row in cursor.fetchall() + dict(zip(col_headers, row)) for row in cursor.fetchall() ) return results |