Repository navigation
Speed up server ranking and search on the Your servers dashboard - #1203
Merged
Merged
Conversation
There was a problem hiding this comment.
ℹ️ No blocking issues. One CI finding below.
Approach
Ranking once per profile and sort is a good fit because filtering preserves the relative order of matching servers.
Reviewed changes
- Ranking and search. Reuse one collator per ranking, filter the ranked rows on each search edit, and preserve name and ID tie-breaks and the missing-member-count fallback.
- Server cards and actions. Memoize cards across search edits and preserve enrollment eligibility for current and older API responses.
- Validation. Review the standalone ordering model and rerun all eight dashboard state tests in jsdom. The search-order test also passed with Swedish default collation.
Non-blocking
- The standalone SMT model triggers the full CI matrix. Running the check planner with the PR paths selects every group because the model path is unclassified. The full matrix has no step that runs a solver. Drop the standalone file and keep the state test as the regression check for the JavaScript implementation. Model · CI planner
gpt-6.2-sol | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Removed the standalone ranking model. The PR description preserves the same proof. I verified that the remaining paths select six affected CI groups, including the frontend checks, and that the dashboard regression tests are unchanged in
8fd55d2.
gpt-6.2-sol | 𝕏
jatmn
marked this pull request as ready for review
December 6, 2026 21:35
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.

Performance
The Your servers page previously configured locale-aware collation for every name comparison and reranked server cards on each search edit. This change ranks once per profile, sort mode, error state and locale. Searching filters the ranked entries and retains unchanged cards.
A production-build benchmark in headless Firefox measured 117 ms before and 87 ms after (1.34×) for typing and erasing “study” over a shuffled 200-server profile. Each of the ten input events verifies the exact visible order. Timings cover input dispatch through committed DOM layout. The five paired trial totals were 114/87, 118/87, 117/89, 111/82 and 126/94 ms. Trials alternated revision order after a warm-up pair. The API was local and simulated.
The 100× full-workload target remains open. Production JavaScript shrank by 47 lines. Baseline
87e1dfed74a0.Correctness
The page properties exercise four sort modes with filtered Unicode names and tied ranks, plus ten combinations of grants and reservation states from the historical sort-eligibility fix in #1182. The filter-only sort-count regression fails on the base and passes here. An SMT model checks that stable filtering preserves the order of every retained pair in a fixed ranking, and that missing member counts follow every known count.
All 643 frontend state tests, 60 supporting frontend tests, the production build, formatting and the WebUI ESLint self-test passed. The eight page-specific tests passed again with the final test assertions.
Summary by Sourcery
Speed up Your servers ranking and search while preserving the selected sort order and existing enrollment behavior.
Enhancements:
Tests:
Reproduce the two ranking proofs with Z3
Save the following as
ranking.smt2and runz3 ranking.smt2. The expected output is twounsatresults. Both were verified after the CI review. The fixed profile and locale assumptions are explicit in the model.