0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 02:13:54 +01:00

Sliding Sync: Short-circuit have_finished_sliding_sync_background_jobs (#17723)

We only need to check it if returned bump stamp is `None`, which is rare.

Pulling this change out from one of @erikjohnston's branches
(https://github.com/element-hq/synapse/compare/develop...erikj/ss_perf)
This commit is contained in:
Eric Eastwood 2024-09-17 17:36:59 -05:00 committed by GitHub
parent d40bc279ed
commit 8881ad6d4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

1
changelog.d/17723.misc Normal file
View file

@ -0,0 +1 @@
Fetch `bump_stamp`'s more efficiently in Sliding Sync.

View file

@ -1171,8 +1171,8 @@ class SlidingSyncHandler:
# `SCHEMA_COMPAT_VERSION` and run the foreground update for # `SCHEMA_COMPAT_VERSION` and run the foreground update for
# `sliding_sync_joined_rooms`/`sliding_sync_membership_snapshots` # `sliding_sync_joined_rooms`/`sliding_sync_membership_snapshots`
# (tracked by https://github.com/element-hq/synapse/issues/17623) # (tracked by https://github.com/element-hq/synapse/issues/17623)
await self.store.have_finished_sliding_sync_background_jobs() latest_room_bump_stamp is None
and latest_room_bump_stamp is None and await self.store.have_finished_sliding_sync_background_jobs()
): ):
return None return None