diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-07-23 19:00:16 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-07-23 19:10:11 +0100 |
commit | 5c705f70c9489427a7985ea10ec60552965b9a1c (patch) | |
tree | 37c8277f6cb7fc7428bb1088da660f91cde0df08 /MANIFEST.in | |
parent | Merge pull request #3584 from matrix-org/erikj/use_cached (diff) | |
download | synapse-5c705f70c9489427a7985ea10ec60552965b9a1c.tar.xz |
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/.
Diffstat (limited to 'MANIFEST.in')
0 files changed, 0 insertions, 0 deletions