Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Short circuit if all new events have same state group #2070

Merged
merged 2 commits into from Mar 27, 2017

Conversation

Projects
None yet
3 participants
Owner

erikjohnston commented Mar 27, 2017

No description provided.

@@ -428,6 +428,7 @@ def _calculate_state_delta(self, room_id, events_context, new_latest_event_ids):
# Now we need to work out the different state sets for
# each state extremities
state_sets = []
+ state_groups = set()
@ara4n

ara4n Mar 27, 2017

Owner

did you say something about set() being bizarrely slow in py2.7?

@erikjohnston

erikjohnston Mar 27, 2017

Owner

I think its probably fine for integers, and I don't think this function will be hit enough for it to be a problem

Owner

ara4n commented Mar 27, 2017

without intimately knowing the wider context of the code, in isolation this looks completely sensible and i don't see any bugs in the code. so looks plausible to me. plus i'd be surprised if there was anything in the wider context which made this problematic.

@erikjohnston erikjohnston merged commit dc56a6b into develop Mar 27, 2017

7 of 8 checks passed

Sytest Dendron (Commit) Build #1829 origin/erikj/perf_send in progress...
Details
Sytest Dendron (Merged PR) Build finished.
Details
Sytest Postgres (Commit) Build #2650 origin/erikj/perf_send succeeded in 6 min 29 sec
Details
Sytest Postgres (Merged PR) Build finished.
Details
Sytest SQLite (Commit) Build #2725 origin/erikj/perf_send succeeded in 5 min 23 sec
Details
Sytest SQLite (Merged PR) Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@erikjohnston erikjohnston deleted the erikj/perf_send branch Oct 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment