Repository navigation
perf(search): rank each palette name once per render - #2606
Merged
Merged
Conversation
searchresults ranked every channel name against the typed text in the usage pick filter, again in the matching-channels filter, and again in rankof for each matching row. matchrank is pure in (label, needle) and needle is fixed for the render, so a per-render map returns the same ranks with one matchname call per distinct label. Signed-off-by: Kalvin C <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
kalvinnchau
marked this pull request as ready for review
November 5, 2026 16:04
wpfleger96
approved these changes
Nov 5, 2026
wpfleger96
left a comment
Member
There was a problem hiding this comment.
🤖 Reviewed: the cache lives for one render with a fixed needle, Map.has correctly caches non-matches and rank 0, and destination-specific ordering stays outside the cache. No findings. Merges cleanly with #2605.
johnmatthewtennant
added a commit
that referenced
this pull request
Nov 5, 2026
Signed-off-by: John Tennant <[email protected]> * origin/main: (47 commits) fix(messages): pass verified labels to the forward recipient picker (#2633) feat(messages): forward a message to a person (#2167) docs(agents): design relay-facing paths for the whole fleet at once (#2620) Route debug sessions through the credential helper (#2541) perf(search): skip no-op slow-search resets on each keystroke (#2605) perf(agents): dedupe channel members only for dm connection setup (#2603) perf(search): keep the search tab row across palette keystrokes (#2588) perf(sidebar): skip the hidden actions menu in solo and team headers (#2582) perf(search): rank each palette name once per render (#2606) perf(sidebar): skip re-rendering unchanged animated channel rows (#2572) feat(settings): follow the system clock and let people hide message times (#2440) feat(plugins): repository access rules for Git imports (#2484) feat(desktop): add Settings to the macOS app menu (#2594) Preserve and renew external app approval (#2464) fix(direct-messages): show verified identity in new message recipient search (#2585) Offer plugin updates from the Buzz shell (#2491) fix(messages): keep decoded images across virtualized remounts (#2474) Keep /leave commands out of channel history (#2476) fix(agents): ask before switching or closing drops unsaved edits (#2503) fix(agents): keep the Model settings row full width (#2577) ...
wpfleger96
added a commit
that referenced
this pull request
Nov 5, 2026
…-service * origin/main: fix(messages): pass verified labels to the forward recipient picker (#2633) feat(messages): forward a message to a person (#2167) docs(agents): design relay-facing paths for the whole fleet at once (#2620) Route debug sessions through the credential helper (#2541) perf(search): skip no-op slow-search resets on each keystroke (#2605) perf(agents): dedupe channel members only for dm connection setup (#2603) perf(search): keep the search tab row across palette keystrokes (#2588) perf(sidebar): skip the hidden actions menu in solo and team headers (#2582) perf(search): rank each palette name once per render (#2606) perf(sidebar): skip re-rendering unchanged animated channel rows (#2572)
cheng-block
added a commit
to cheng-block/buzz-app
that referenced
this pull request
Nov 5, 2026
…ettings-shift-esc * upstream/main: (40 commits) feat(conversation): let plugin rows manage messages without visiting a channel (block#2512) feat(github): make side-panel link opening optional (block#2629) feat(messages): show a blurred thumbnail until an image loads (block#2556) fix(relay): give large roster and read-state reads a 30s deadline (block#2627) fix(user-status): show a status emoji's :name: on hover where the full status shows (block#2384) fix(inbox): keep the list's place when returning in the same session (block#2134) fix(messages): pass verified labels to the forward recipient picker (block#2633) feat(messages): forward a message to a person (block#2167) docs(agents): design relay-facing paths for the whole fleet at once (block#2620) Route debug sessions through the credential helper (block#2541) perf(search): skip no-op slow-search resets on each keystroke (block#2605) perf(agents): dedupe channel members only for dm connection setup (block#2603) perf(search): keep the search tab row across palette keystrokes (block#2588) perf(sidebar): skip the hidden actions menu in solo and team headers (block#2582) perf(search): rank each palette name once per render (block#2606) perf(sidebar): skip re-rendering unchanged animated channel rows (block#2572) feat(settings): follow the system clock and let people hide message times (block#2440) feat(plugins): repository access rules for Git imports (block#2484) feat(desktop): add Settings to the macOS app menu (block#2594) Preserve and renew external app approval (block#2464) ... Signed-off-by: Cheng Peng <[email protected]> Co-authored-by: Cursor <[email protected]>
johnmatthewtennant
added a commit
that referenced
this pull request
Nov 5, 2026
…thumbnails * origin/main: (120 commits) feat(conversation): let plugin rows manage messages without visiting a channel (#2512) feat(github): make side-panel link opening optional (#2629) feat(messages): show a blurred thumbnail until an image loads (#2556) fix(relay): give large roster and read-state reads a 30s deadline (#2627) fix(user-status): show a status emoji's :name: on hover where the full status shows (#2384) fix(inbox): keep the list's place when returning in the same session (#2134) fix(messages): pass verified labels to the forward recipient picker (#2633) feat(messages): forward a message to a person (#2167) docs(agents): design relay-facing paths for the whole fleet at once (#2620) Route debug sessions through the credential helper (#2541) perf(search): skip no-op slow-search resets on each keystroke (#2605) perf(agents): dedupe channel members only for dm connection setup (#2603) perf(search): keep the search tab row across palette keystrokes (#2588) perf(sidebar): skip the hidden actions menu in solo and team headers (#2582) perf(search): rank each palette name once per render (#2606) perf(sidebar): skip re-rendering unchanged animated channel rows (#2572) feat(settings): follow the system clock and let people hide message times (#2440) feat(plugins): repository access rules for Git imports (#2484) feat(desktop): add Settings to the macOS app menu (#2594) Preserve and renew external app approval (#2464) ... Signed-off-by: John Tennant <[email protected]> # Conflicts: # src-tauri/src/relay.rs
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.
Problem
Each
SearchResultsrender ranks every channel name against the typed text more than once. It ranks them in the filter that builds the usagepickcandidates, again in the filter that builds the matching channels, and once more inrankOffor every matching channel and DM row.matchRankruns the fullmatchNamesearch, including its word-run memo, on every call. The palette re-renders on each keystroke and each lookup round, so with 128 DMs most of that work is repeated.Change
A per-render
Mapremembers each label's rank for the current needle. The three channel ranking sites read it throughrankName. People keep their own needle and ranking; they are not affected.No behavior changes
matchRankis a pure function of the label and the needle, and the needle is fixed for the render. Every site therefore gets the same rank as before, includingundefinedfor a non-match. TheSearchResults,PageSearchandSearchChoicessuites pass unchanged.Evidence
Browser benchmark with 128 DMs, 1,001 participants and read state, at 4× CPU throttling in production Chromium:
Stock and this PR were interleaved on 8 Linux and 8 macOS workstations. Medians are per run.
Lower is better. Blocking is long-animation-frame blocking time. There are 96 samples per cell.
Checks: the
SearchResults,PageSearchandSearchChoicessuites pass (174 tests), along withtscandbiome.🤖 Generated with Claude Code