synapse-product/synapse
Richard van der Hoff 5c705f70c9 Fixes and optimisations for resolve_state_groups
First of all, fix the logic which looks for identical input state groups so
that we actually use them. This turned out to be most easily done by factoring
the relevant code out to a separate function so that we could do an early
return.

Secondly, avoid building the whole `conflicted_state` dict (which was only ever
used as a boolean flag).

Thirdly, replace the construction of the `state` dict (which mapped from keys
to events that set them), with an optimistic construction of the resolution
result assuming there will be no conflicts. This should be no slower than
building the old `state` dict, and:
  - in the conflicted case, we'll short-cut it, saving part of the work
  - in the unconflicted case, it saves rebuilding the resolution from the
    `state` dict.

Finally, do a couple of s/values/itervalues/.
2018-07-23 19:10:11 +01:00
..
api Use new getters 2018-07-23 13:17:22 +01:00
app Make the rest of the .iterwhatever go away (#3562) 2018-07-21 15:47:18 +10:00
appservice run isort 2018-07-09 16:09:20 +10:00
config rerun isort with latest version 2018-07-16 14:23:25 +02:00
crypto run isort 2018-07-09 16:09:20 +10:00
events Comments 2018-07-23 17:43:01 +01:00
federation Run things as background processes 2018-07-18 20:55:05 +01:00
groups another typo 2018-07-10 12:28:42 +01:00
handlers Fix missing attributes on workers. 2018-07-23 16:28:00 +01:00
http Move v1-only APIs into their own module & isolate deprecated ones (#3460) 2018-07-19 20:03:33 +10:00
metrics Resource tracking for background processes 2018-07-18 10:50:33 +01:00
module_api
push Use new getters 2018-07-23 13:17:22 +01:00
replication Fix missing attributes on workers. 2018-07-23 16:28:00 +01:00
rest Admin API for creating new users (#3415) 2018-07-20 22:41:13 +10:00
server_notices run isort 2018-07-09 16:09:20 +10:00
static/client
storage Comments 2018-07-23 17:43:01 +01:00
streams Fix develop because I broke it :( (#3535) 2018-07-14 09:51:00 +10:00
util Test and fix support for cancellation in Linearizer 2018-07-20 13:59:55 +01:00
__init__.py 0.33 final 2018-07-19 21:11:40 +10:00
event_auth.py run isort 2018-07-09 16:09:20 +10:00
notifier.py WIP to announce deleted devices over federation 2018-07-12 01:32:39 +01:00
python_dependencies.py Correct attrs package name in requirements (#3492) 2018-07-07 10:46:59 +10:00
secrets.py Admin API for creating new users (#3415) 2018-07-20 22:41:13 +10:00
server.py Admin API for creating new users (#3415) 2018-07-20 22:41:13 +10:00
server.pyi Send users a server notice about consent 2018-05-22 11:54:51 +01:00
state.py Fixes and optimisations for resolve_state_groups 2018-07-23 19:10:11 +01:00
types.py run isort 2018-07-09 16:09:20 +10:00
visibility.py Make the rest of the .iterwhatever go away (#3562) 2018-07-21 15:47:18 +10:00