This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Optimize how we calculate
likely_domains
during backfill #13575Optimize how we calculate
likely_domains
during backfill #13575Changes from 9 commits
4e397c5
abd77f7
d9cd3ef
a55f094
396ca2d
cf68485
b90ab98
6ba5ef3
55330c8
aafb356
f32739c
6700cf5
3fb2ade
9a56cbe
42b04c4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eliminating this option to get domains for a room in favor of
get_current_hosts_in_room
.In a room like
#matrixhq
, getting all 80k state events in the room, then whittling it down in the app is not faster than a quick targeted database query or maybe even luckily hitting the cache.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the query to order by depth to match what
get_domains_from_state
did before (drop-in replacement).The heuristic of sorting by servers who have been there the longest is good because they're most likely to have anything we ask about.