Repository navigation
perf(drawer): stop caption deltas rebuilding the voice board - #235
Merged
Merged
Conversation
During a call Home rebuilt the voice session board twice on every action, including each caption delta (20-30 a second): it filtered unread sessions, worked out busy and attention directories and built a new board, only to find it equal to the last one. Now Home compares a cheap VoiceSessionBoardInput (status without busy, sessions, active IDs, parent sources, pinned keys, the open session and the Developer Mode home state) and builds and publishes the board only when that changes. Ports iOS #296 (8162a47d). Verified: vm.sh check (full) passes. Ported captionDeltasNeverRebuildTheBoard: 200 deltas publish nothing, attention refreshes publish once each, and every field the board reads changes the input too. On the VM JVM the per-action cost dropped from about 11/33/170 us (50/200/1000 sessions) to about 0.4 us.
The voice board watcher sat on the detail reducer, which runs before Catch Up reconciles. After the current card was deleted from another device, the board was published before Catch Up opened the next card, so the next card's directory could be missing. The watcher now sits in fullBody() beside the streamFocusSessionIDs watcher. This hole was there on dev too. The ported voice board test now also varies manually unread keys, the open session, family sessions, connection state, the server and Developer Mode. The drawer parity row names voiceSessionBoardInput. Verified on the Android VM: full scripts/check.sh passes. CatchUpTests.theCardCatchUpOpensAfterADeletionIsStreamFocused fails without the move and passes with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
During a voice call, every caption word made Home build the drawer status for the call twice, once before the action and once after, to see whether it changed. Now Home compares a small input (
VoiceSessionBoardInput: status, sessions, active IDs, parents, pins, the open session and Developer Mode's home) and builds the board only when that input changes. Ports iOS #296 (8162a47d). The watcher also moved to run after Catch Up reconciles. Before, after the current card was deleted from another device, the board could be published without the next card's directory. That hole was on dev too.Nothing visible changes, so no media. Verified on the Android VM: the full
scripts/check.shpasses. The ported iOS testcaptionDeltasNeverRebuildTheBoardchecks publish counts and that each tested input change also changes the input; it passes without the fix too, because dev publishes the same number of times. The extended Catch Up deletion test fails without the watcher move and passes with it.