mirror of
https://github.com/element-hq/synapse
synced 2024-08-18 20:20:52 +00:00
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.
This commit is contained in:
parent
c6b1441c52
commit
eb32b2ca20
1 changed files with 1 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue