diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-06-11 22:56:11 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-06-11 22:56:11 +0100 |
commit | eb32b2ca2018814ca8af08751e3b31f35fa71d24 (patch) | |
tree | b12eba80779b0f1592f1464ff297bede5a515085 /synapse/storage | |
parent | Fix event filtering in get_missing_events handler (diff) | |
download | synapse-eb32b2ca2018814ca8af08751e3b31f35fa71d24.tar.xz |
Optimise state_group_cache update
(1) matrix-org-hotfixes has removed the intern calls; let's do the same here. (2) remove redundant iteritems() so we can used an optimised db update.
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/state.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py index bdee14a8eb..85c8fffc19 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py @@ -567,11 +567,7 @@ class StateGroupWorkerStore(SQLBaseStore): # from the database. for group, group_state_dict in iteritems(group_to_state_dict): state_dict = results[group] - - state_dict.update( - ((intern_string(k[0]), intern_string(k[1])), to_ascii(v)) - for k, v in iteritems(group_state_dict) - ) + state_dict.update(group_state_dict) self._state_group_cache.update( cache_seq_num, |