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
..
2018-07-23 13:17:22 +01:00
2018-07-09 16:09:20 +10:00
2018-07-16 14:23:25 +02:00
2018-07-09 16:09:20 +10:00
2018-07-23 17:43:01 +01:00
2018-07-10 12:28:42 +01:00
2018-07-23 13:17:22 +01:00
2018-07-09 16:09:20 +10:00
2018-07-23 17:43:01 +01:00
2018-07-19 21:11:40 +10:00
2018-07-09 16:09:20 +10:00
2018-07-09 16:09:20 +10:00