zed/crates/rpc
Max Brunsfeld 279c5ab81f
Reduce DB load upon initial connection due to channel loading (#12500)
#### Lazily loading channels

I've added a new RPC message called `SubscribeToChannels` that the
client now sends when it first renders the channels panel. This causes
the server to load the channels for that client and send updates to that
client as channels are updated. Previously, the server did this upon
connection.

For backwards compatibility, the server will inspect clients' version,
and continue to do this work immediately for old clients.

#### Optimizations

Running collab locally, I realized that upon connecting, we were running
two concurrent transactions that *both* queried the `channel_members`
table: one for loading your channels, and one for loading your channel
invites. I've combined these into one query. In addition, we now use a
join to load channels + members, as opposed to two separate queries.
Even though `where id in` is efficient, it adds an extra round trip to
the database, keeping the transaction open for slightly longer.

Release Notes:

- N/A
2024-05-30 13:02:55 -07:00
..
proto Reduce DB load upon initial connection due to channel loading (#12500) 2024-05-30 13:02:55 -07:00
src Reduce DB load upon initial connection due to channel loading (#12500) 2024-05-30 13:02:55 -07:00
build.rs remove more commented code 2024-01-12 20:10:40 -08:00
Cargo.toml Add telemetry events for loading extensions (#9793) 2024-03-25 17:30:48 -04:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00