Repository navigation
perf(mobile): keep verified-name batches open as people are added - #9450
Conversation
Each newly tracked person rebuilt every batch from the whole tracked list, so the last batch was closed and read again with everyone in it, and past 1,024 people every eviction shifted every batch and re-read all of them. Keep intact batches open, read newcomers in a batch of their own, and merge small batches once four are open. Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz> Signed-off-by: Tom Brow <[email protected]>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
At the four-partial cap, retire the smallest partial batches only until the new subjects fill a batch (at least one when they would leave a partial of their own), instead of re-reading every partial. Replace a batch whose subject was evicted and tracked again before the sync, so its check mark and any pruned cached head are restored. Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost> Signed-off-by: Tom Brow <[email protected]>
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🔐 Codex Security Review
Review SummaryOverall Risk: NONE
FindingsNo concrete security, correctness, or reliability findings were identified. Notes
Generated by Codex Security Review | |
kazemek21
left a comment
There was a problem hiding this comment.
Kyle reviewed this PR and the Nexus review-tracker notes and approved with no comments.
Posted by Codex (gpt-6.1-sol) on behalf of kylez
* origin/main: (24 commits) docs(readme): point desktop readers at block/buzz-app and describe where each client lives (#9493) test(cli,db): freeze the assertion test clock and give pool release tests a test-lane acquire budget (#9442) test(desktop): unmount every TerminalSubstrate tree before the window closes (#9440) fix(mobile): drop the iOS share extension from the build until it's signed (#9489) chore(release): release Buzz Desktop version 0.5.30 (#9491) perf(mobile): parse each event's thread reference once (#9460) perf(mobile): load only the directory when search opens (#9466) perf(mobile): stop rebuilding Home's channel list when a route covers it (#9459) perf(mobile): ask typing subscriptions only for the typing window (#9454) perf(mobile): skip avatar URL parsing for non-HTTP URLs (#9448) perf(mobile): download the identity archive list only when it changed (#9445) perf(mobile): don't treat a Control Center pull as a resume (#9443) fix(mobile): keep a superseded roster read out of the offline snapshot (#9452) perf(mobile): read channel bot roles from the member list (#9451) perf(mobile): read Activity once per reconnect (#9455) fix(mobile): offer role controls for agents (#9475) perf(mobile): stop rebuilding the native nav bar on every scrolled frame (#9458) perf(mobile): keep verified-name batches open as people are added (#9450) perf(mobile): read only changed custom emoji sets on reconnect (#9446) perf(mobile): keep latest-message times on a directory load (#9457) ... Signed-off-by: Will Pfleger <[email protected]> # Conflicts: # crates/buzz-cli/src/desktop_provider.rs
…eaction-recipients * origin/main: (111 commits) perf(acp): avoid repeated observer batch serialization (#9483) docs(readme): point desktop readers at block/buzz-app and describe where each client lives (#9493) test(cli,db): freeze the assertion test clock and give pool release tests a test-lane acquire budget (#9442) test(desktop): unmount every TerminalSubstrate tree before the window closes (#9440) fix(mobile): drop the iOS share extension from the build until it's signed (#9489) chore(release): release Buzz Desktop version 0.5.30 (#9491) perf(mobile): parse each event's thread reference once (#9460) perf(mobile): load only the directory when search opens (#9466) perf(mobile): stop rebuilding Home's channel list when a route covers it (#9459) perf(mobile): ask typing subscriptions only for the typing window (#9454) perf(mobile): skip avatar URL parsing for non-HTTP URLs (#9448) perf(mobile): download the identity archive list only when it changed (#9445) perf(mobile): don't treat a Control Center pull as a resume (#9443) fix(mobile): keep a superseded roster read out of the offline snapshot (#9452) perf(mobile): read channel bot roles from the member list (#9451) perf(mobile): read Activity once per reconnect (#9455) fix(mobile): offer role controls for agents (#9475) perf(mobile): stop rebuilding the native nav bar on every scrolled frame (#9458) perf(mobile): keep verified-name batches open as people are added (#9450) perf(mobile): read only changed custom emoji sets on reconnect (#9446) ... Signed-off-by: Matthew Boston <[email protected]>
Verified names are read in subscriptions of up to 128 people. Each time someone new was tracked, the batches were rebuilt from the whole tracked list, so the last partial batch got a new identity, was closed, and was reopened with everyone in it plus the newcomer. Profiles show up a few at a time (search results, channel members, mentions), so the same records were read again and again. Past 1,024 tracked people, each newcomer evicts the oldest, which shifts every batch boundary, so every batch was closed and all 1,024 records were read again.
Now an open batch stays open as long as all its people are still tracked. Newly tracked people get a batch of their own. A batch that loses someone to eviction, or that the relay retried, is replaced as before, and so is a batch whose person was evicted and tracked again before the batch was re-checked, so their check mark and cached name are re-read. Once four batches are smaller than 128, the next addition merges the smallest of them with the newcomers until they fill a batch (at least one, so no fifth small batch appears). The subscription count stays within four of the minimum, and a merge re-reads at most 128 plus the largest small batch.
People already checked also stay checked while a newcomer's batch opens; before, the reopened batch briefly unchecked them.
Validation
New tests: tracking one more person opens a batch with only that person, and the people already checked stay checked throughout; with four small batches of 64 open, one more person merges two of them into a full batch and leaves the other two open; a large addition past four small batches still retires one; tracking one more person at the 1,024 limit re-reads only the batch that lost the oldest person; a person evicted and tracked again before the sync is re-read and checked; and a re-tracked person keeps their verified name when the cached-name limit trims it. Existing batch, eviction, retry and reconnect tests pass unchanged (one comment updated). Full mobile test suite and
flutter analyzepass.On an iPhone 12 mini signed in to Block's Builderlab (instrumented profile build of e2fb02c), opening search and typing "presence" after opening a channel and a thread: verified-name reads went from 21 subscriptions and 328 KB before this change to 11 and 88 KB with it (counted per subscription opened; the first revision measured the same way gave 11 and 90 KB).
The same automated run covered cold start, opening the-squad and one of its threads, search with the People filter, opening buzz-mobile's details and scrolling its full 86-person member list, and a 60 s background then resume (the resync re-read 2 batches, 65 KB). Names rendered throughout.
Regressions
Up to four more open subscriptions while small batches accumulate, each held open by the relay like the existing ones. A community with under 128 tracked people now has up to five instead of one. No merge policy reads less than the old slicing on every sequence of additions. In a model of 3,000 random tracking sequences, this one read more records than the old code in about 1 sequence in 500, by at most a quarter.