synapse
synapse copied to clipboard
Faster joins: non-`lazy_load_members` `/sync`s should not block
Instead they should pretend that the room has not been joined yet.
/sync
s with lazy_load_members
turned on should continue to return the room.
One particular challenge here is being able to figure out which rooms have completed their state resyncs since a given /sync
token.
For the record (contrary to what I may have said earlier): this is a fair way down the order of things that I agreed with dan, so maybe not the best battlefront to open right now. Having non-lazy_load_members
/sync
s block while a faster join is in progress is fine for now.
One particular challenge here is being able to figure out which rooms have completed their state resyncs since a given
/sync
token.
I guess the simplest thing is to add a table that stores the stream ordering of when a room completed joining? Then the sync code can check that table for new rooms.
Note that we already have features for excluding rooms from /sync
, so we have prior art there.
I guess the simplest thing is to add a table that stores the stream ordering of when a room completed joining? Then the sync code can check that table for new rooms.
I guess the question is more, which stream should we use? We could reuse the events stream, but that would add another complexity to an already complex stream. We could make a new one, but that would mean adding another field to the sync tokens.
I guess the question is more, which stream should we use? We could reuse the events stream, but that would add another complexity to an already complex stream. We could make a new one, but that would mean adding another field to the sync tokens.
Yeah. I'm unenthusiastic about complexifying the events
stream any further, even if that does mean adding yet another field to the sync tokens. (Sliding sync will mean that clients no longer need to worry about raw sync tokens, right??)
Just a note of an edge case before I forget: if you see a room become un-partial-stated in a sync's window, it's important to still check that it isn't partial-stated at the end. The room could have been left and rejoined in the meantime since becoming originally un-partial-stated.