Sync is the classic /sync only - no sliding sync, in either the MSC3575 or the
simplified MSC4186 spelling.
Classic sync sends the whole account's state and grows with it. On an account in a few
hundred rooms the initial sync is enormous and every incremental one carries rooms
nobody is looking at. Sliding sync exists precisely to ask for the rooms on screen and
nothing else, and it is the single reason Element X starts in a second where Element
Web takes a minute.
This is the one Matrix item with a performance argument rather than a feature argument,
which is why it is worth more than the four below it.
Sync is the classic `/sync` only - no sliding sync, in either the MSC3575 or the
simplified MSC4186 spelling.
Classic sync sends the whole account's state and grows with it. On an account in a few
hundred rooms the initial sync is enormous and every incremental one carries rooms
nobody is looking at. Sliding sync exists precisely to ask for the rooms on screen and
nothing else, and it is the single reason Element X starts in a second where Element
Web takes a minute.
This is the one Matrix item with a performance argument rather than a feature argument,
which is why it is worth more than the four below it.
Written as an adapter: the MSC4186 response is translated into the shape process_sync_response already reads, so the 280 lines that know how a room
becomes a buffer are left alone rather than duplicated for a second wire format.
Off by default, per account, with a toggle in the Matrix account tools. This
replaces the whole of how an account talks to its server and cannot be half-made -
if the translation is wrong the account does not sync at all. Defaulting it on
would have switched every account on a flag-advertising homeserver, matrix.org
included, on the strength of unit tests against a response the daemon wrote
itself. The toggle says to turn it back off if messages stop.
Two consequences worth knowing:
MSC4186 has no presence extension, so who is online stops arriving while it is
on. Named in sliding.rs rather than left to be discovered.
The window is not narrowed yet. moho's buffer list holds every conversation at
once, so a room outside a window would vanish from it; the list is asked for in
one wide range. Most of the saving is there anyway (a room is sent once, then
only what changed), but narrowing it properly needs the buffer list to become
window-aware, which is client work rather than daemon work. Worth its own issue
if the wide range turns out not to be enough.
Verified: matrix.org advertises org.matrix.simplified_msc3575; the endpoint
answers 401 to an unauthenticated POST while classic /sync answers 405 to the
same, confirming the GET/POST split; 11 tests cover the translation.
Not verified against a real logged-in account — which is why it ships off.
Finished — https://git.salastil.com/Salastil/nobilis/commit/2505f58, https://git.salastil.com/Salastil/moho/commit/0517d0f
Written as an adapter: the MSC4186 response is translated into the shape
`process_sync_response` already reads, so the 280 lines that know how a room
becomes a buffer are left alone rather than duplicated for a second wire format.
**Off by default, per account, with a toggle in the Matrix account tools.** This
replaces the whole of how an account talks to its server and cannot be half-made -
if the translation is wrong the account does not sync at all. Defaulting it on
would have switched every account on a flag-advertising homeserver, matrix.org
included, on the strength of unit tests against a response the daemon wrote
itself. The toggle says to turn it back off if messages stop.
Two consequences worth knowing:
- MSC4186 has no presence extension, so who is online stops arriving while it is
on. Named in `sliding.rs` rather than left to be discovered.
- The window is not narrowed yet. moho's buffer list holds every conversation at
once, so a room outside a window would vanish from it; the list is asked for in
one wide range. Most of the saving is there anyway (a room is sent once, then
only what changed), but narrowing it properly needs the buffer list to become
window-aware, which is client work rather than daemon work. Worth its own issue
if the wide range turns out not to be enough.
Verified: matrix.org advertises `org.matrix.simplified_msc3575`; the endpoint
answers 401 to an unauthenticated POST while classic `/sync` answers 405 to the
same, confirming the GET/POST split; 11 tests cover the translation.
**Not verified against a real logged-in account** — which is why it ships off.
Reopening is not needed - the feature was there - but it had never met a real homeserver, and the note on prefer_sliding_sync said so outright: it was left an opt-in switch because it had only ever been tested against responses the daemon wrote itself.
A matrix.org account arrived. Turned on, sliding sync failed on the second request and every request after, with M_UNKNOWN_POS. Fixed in nobilis e2bb988, along with the two things that made it hard to see:
the sync loop logged {e} where it wanted {e:#}, so every failure the Matrix sync has ever had printed as "sync request failed" and nothing else
a renamed room kept its old name for ever, because the name is derived once and cached and the buffer is keyed by it
Sliding sync now survives a dead position by starting a fresh stream, which is what the server is asking for when it says that. Verified against matrix.org: rename a room and the buffer follows in two seconds, send a message and the server's copy replaces the echo in two.
Whether the switch should now default on for a server that advertises the flag is a separate question - worth a second opinion from an account with more than a handful of rooms before changing the default.
Reopening is not needed - the feature was there - but it had never met a real homeserver, and the note on `prefer_sliding_sync` said so outright: it was left an opt-in switch because it had only ever been tested against responses the daemon wrote itself.
A matrix.org account arrived. Turned on, sliding sync failed on the second request and every request after, with `M_UNKNOWN_POS`. Fixed in nobilis e2bb988, along with the two things that made it hard to see:
- the sync loop logged `{e}` where it wanted `{e:#}`, so every failure the Matrix sync has ever had printed as "sync request failed" and nothing else
- a renamed room kept its old name for ever, because the name is derived once and cached and the buffer is keyed by it
Sliding sync now survives a dead position by starting a fresh stream, which is what the server is asking for when it says that. Verified against matrix.org: rename a room and the buffer follows in two seconds, send a message and the server's copy replaces the echo in two.
Whether the switch should now default on for a server that advertises the flag is a separate question - worth a second opinion from an account with more than a handful of rooms before changing the default.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Sync is the classic
/synconly - no sliding sync, in either the MSC3575 or thesimplified MSC4186 spelling.
Classic sync sends the whole account's state and grows with it. On an account in a few
hundred rooms the initial sync is enormous and every incremental one carries rooms
nobody is looking at. Sliding sync exists precisely to ask for the rooms on screen and
nothing else, and it is the single reason Element X starts in a second where Element
Web takes a minute.
This is the one Matrix item with a performance argument rather than a feature argument,
which is why it is worth more than the four below it.
Finished — https://git.salastil.com/Salastil/nobilis/commit/2505f58, https://git.salastil.com/Salastil/moho/commit/0517d0f
Written as an adapter: the MSC4186 response is translated into the shape
process_sync_responsealready reads, so the 280 lines that know how a roombecomes a buffer are left alone rather than duplicated for a second wire format.
Off by default, per account, with a toggle in the Matrix account tools. This
replaces the whole of how an account talks to its server and cannot be half-made -
if the translation is wrong the account does not sync at all. Defaulting it on
would have switched every account on a flag-advertising homeserver, matrix.org
included, on the strength of unit tests against a response the daemon wrote
itself. The toggle says to turn it back off if messages stop.
Two consequences worth knowing:
on. Named in
sliding.rsrather than left to be discovered.once, so a room outside a window would vanish from it; the list is asked for in
one wide range. Most of the saving is there anyway (a room is sent once, then
only what changed), but narrowing it properly needs the buffer list to become
window-aware, which is client work rather than daemon work. Worth its own issue
if the wide range turns out not to be enough.
Verified: matrix.org advertises
org.matrix.simplified_msc3575; the endpointanswers 401 to an unauthenticated POST while classic
/syncanswers 405 to thesame, confirming the GET/POST split; 11 tests cover the translation.
Not verified against a real logged-in account — which is why it ships off.
Reopening is not needed - the feature was there - but it had never met a real homeserver, and the note on
prefer_sliding_syncsaid so outright: it was left an opt-in switch because it had only ever been tested against responses the daemon wrote itself.A matrix.org account arrived. Turned on, sliding sync failed on the second request and every request after, with
M_UNKNOWN_POS. Fixed in nobilis e2bb988, along with the two things that made it hard to see:{e}where it wanted{e:#}, so every failure the Matrix sync has ever had printed as "sync request failed" and nothing elseSliding sync now survives a dead position by starting a fresh stream, which is what the server is asking for when it says that. Verified against matrix.org: rename a room and the buffer follows in two seconds, send a message and the server's copy replaces the echo in two.
Whether the switch should now default on for a server that advertises the flag is a separate question - worth a second opinion from an account with more than a handful of rooms before changing the default.