GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — perf(client): batch large thread sync updates by danvernon · Pull Request #5344 · pingdotgg/t3code Conversation
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ApprovabilityVerdict: Needs human review This performance optimization changes the timing characteristics of thread state synchronization by batching updates. While the tests cover key scenarios, the change to a core sync mechanism by an author new to this file warrants human review to verify the batching approach is safe across all edge cases. You can customize Macroscope's approvability policy. Learn more. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Imported from pingdotgg#5344 at source SHA 783fd02 (commits b623dc2 + 783fd02 squashed into one provenance commit). Imported behavior: - `reduceThreadStreamItems`, a pure reducer that folds a batch of thread stream items into one state and one persistable snapshot. - `Stream.groupedWithin(64, 16ms)` on the live subscription so a burst of thread events publishes the `SubscriptionRef` once instead of per event, and web/mobile stop rebuilding large thread views per streamed event. - `eventBatchSize` on `EnvironmentThreadStateOptions`, plus the upstream regression tests for ordered single-publication bursts and for persisting a settled snapshot when a batch ends with a non-persistable turn start. Local adaptations: - Kept our `httpSnapshotLoadAttempted` guard around the HTTP snapshot fallback; the call now goes through `applyItems([...])`. - Restored `setDeleted` (removed upstream) for the terminal `thread-deleted` subscription failure, which never reaches the item stream and so cannot go through the batch reducer. Cache removal is shared with the reducer path via `removeCachedThread`. Excluded: - `tasks/todo.md`, the author's scratch checklist. Follow-up (fork/changes, not this layer): our `reload-required` branch and `reloadFromServer` are built on the deleted `setThread`, so rebasing fork/changes onto this layer must re-express them against the reducer (split the batch at the reload point, then re-enter `applyItems` with the remainder).
… (#328) Imported from pingdotgg#5344 at source SHA 783fd02 (commits b623dc2 + 783fd02 squashed into one provenance commit). Imported behavior: - `reduceThreadStreamItems`, a pure reducer that folds a batch of thread stream items into one state and one persistable snapshot. - `Stream.groupedWithin(64, 16ms)` on the live subscription so a burst of thread events publishes the `SubscriptionRef` once instead of per event, and web/mobile stop rebuilding large thread views per streamed event. - `eventBatchSize` on `EnvironmentThreadStateOptions`, plus the upstream regression tests for ordered single-publication bursts and for persisting a settled snapshot when a batch ends with a non-persistable turn start. Local adaptations: - Kept our `httpSnapshotLoadAttempted` guard around the HTTP snapshot fallback; the call now goes through `applyItems([...])`. - Restored `setDeleted` (removed upstream) for the terminal `thread-deleted` subscription failure, which never reaches the item stream and so cannot go through the batch reducer. Cache removal is shared with the reducer path via `removeCachedThread`. Excluded: - `tasks/todo.md`, the author's scratch checklist. Follow-up (fork/changes, not this layer): our `reload-required` branch and `reloadFromServer` are built on the deleted `setThread`, so rebasing fork/changes onto this layer must re-express them against the reducer (split the batch at the reload point, then re-enter `applyItems` with the remainder). Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
… (#328) Imported from pingdotgg#5344 at source SHA 783fd02 (commits b623dc2 + 783fd02 squashed into one provenance commit). Imported behavior: - `reduceThreadStreamItems`, a pure reducer that folds a batch of thread stream items into one state and one persistable snapshot. - `Stream.groupedWithin(64, 16ms)` on the live subscription so a burst of thread events publishes the `SubscriptionRef` once instead of per event, and web/mobile stop rebuilding large thread views per streamed event. - `eventBatchSize` on `EnvironmentThreadStateOptions`, plus the upstream regression tests for ordered single-publication bursts and for persisting a settled snapshot when a batch ends with a non-persistable turn start. Local adaptations: - Kept our `httpSnapshotLoadAttempted` guard around the HTTP snapshot fallback; the call now goes through `applyItems([...])`. - Restored `setDeleted` (removed upstream) for the terminal `thread-deleted` subscription failure, which never reaches the item stream and so cannot go through the batch reducer. Cache removal is shared with the reducer path via `removeCachedThread`. Excluded: - `tasks/todo.md`, the author's scratch checklist. Follow-up (fork/changes, not this layer): our `reload-required` branch and `reloadFromServer` are built on the deleted `setThread`, so rebasing fork/changes onto this layer must re-express them against the reducer (split the batch at the reload point, then re-enter `applyItems` with the remainder). Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
… (#328) Imported from pingdotgg#5344 at source SHA 783fd02 (commits b623dc2 + 783fd02 squashed into one provenance commit). Imported behavior: - `reduceThreadStreamItems`, a pure reducer that folds a batch of thread stream items into one state and one persistable snapshot. - `Stream.groupedWithin(64, 16ms)` on the live subscription so a burst of thread events publishes the `SubscriptionRef` once instead of per event, and web/mobile stop rebuilding large thread views per streamed event. - `eventBatchSize` on `EnvironmentThreadStateOptions`, plus the upstream regression tests for ordered single-publication bursts and for persisting a settled snapshot when a batch ends with a non-persistable turn start. Local adaptations: - Kept our `httpSnapshotLoadAttempted` guard around the HTTP snapshot fallback; the call now goes through `applyItems([...])`. - Restored `setDeleted` (removed upstream) for the terminal `thread-deleted` subscription failure, which never reaches the item stream and so cannot go through the batch reducer. Cache removal is shared with the reducer path via `removeCachedThread`. Excluded: - `tasks/todo.md`, the author's scratch checklist. Follow-up (fork/changes, not this layer): our `reload-required` branch and `reloadFromServer` are built on the deleted `setThread`, so rebasing fork/changes onto this layer must re-express them against the reducer (split the batch at the reload point, then re-enter `applyItems` with the remainder). Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com>
|
Note 🤖 GPT-6 Astra (preview) responding on behalf of Theo This was closed as part of an automated cleanup pass. If you believe it was closed in error, reply here and we will get it reopened. Closing in favor of #8309, where review of client event batching continues. That version covers thread and shell updates, keeps pagination state, and rejects buffered events from replaced subscriptions. It already includes the settled-mid-batch snapshot case from this proposal. The batching fix is not yet merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.