perf(client-runtime): halve server config bootstrap traffic (#8367)
Reuse one server config subscription for session bootstrap and live updates. Preserve environment theme opt-in, replay, deletion, slow subscriber recovery, and config stream failure handling. Co-authored-by: Adamulek123 <[email protected]>
This commit is contained in:
1 parent
e86604d337
commit
b883fc066e
20 files changed
+1053
-151
No files matched your search
@@ -91,6 +91,7 @@ function registryLayer(options?: {
|
||||
const session: RpcSession = {
|
||||
client,
|
||||
initialConfig: Effect.never,
|
||||
subscribeServerConfig: (input) => client.subscribeServerConfig(input),
|
||||
ready: Effect.void,
|
||||
probe: Effect.void,
|
||||
closed: Effect.never,
|
||||
|
||||
@@ -30,7 +30,10 @@ type ConnectionLayerSource =
|
||||
| typeof backgroundActivityObserverLayer
|
||||
| typeof backgroundActivityReporterLayer;
|
||||
|
||||
const providedClientConnectionLayer = Layer.merge(Connection.layer, snapshotLoaderLayer).pipe(
|
||||
const providedClientConnectionLayer = Layer.merge(
|
||||
Connection.layerWithOptions({ environmentThemes: true }),
|
||||
snapshotLoaderLayer,
|
||||
).pipe(
|
||||
Layer.provideMerge(
|
||||
Layer.mergeAll(
|
||||
runtimeContextLayer,
|
||||
|
||||
Reference in new issue
Block a user