Repository navigation
perf(dashboard): Check versions every 10s while the reader is away - #2864
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
After 5 minutes without input, the versions poll runs every 10s instead of 5s, the same as the old idle detail poll. The next input checks at once and goes back to 5s. Co-Authored-By: BYK <[email protected]>
sentry-junior
Bot
force-pushed
the
perf/dashboard-away-backoff
branch
from
November 7, 2026 03:15
a1ea087 to
5952b92
Compare
Contributor
|
9 screenshot changes — 9 changed · 0 added · 0 removed Review screenshots in Frameshift |
BYK
approved these changes
Nov 7, 2026
23 tasks done
This branch was successfully deployed
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.
Follows #2863 (merged; this branch is rebased on main). After 5 minutes without input (pointer, key, wheel, touch, or focus), the versions poll runs every 10s instead of 5s. The next input checks at once and goes back to 5s.
client/versions.tskeeps the last input time in a ref.refetchIntervalpicks 5s or 10s after each check.e2e/versions-poll.spec.ts, becauseconversations.spec.tswould pass 1,000 lines.Why 5s while present, not lower
The versions check is 1 statement. It takes 17-19ms p50 for a heavy viewer (2,000 roots, 3,000 child agents) on local Postgres 17. Request count is the other cost that hurts today:
3s gives back the request cut, and 2s is above the old count. 5s halves the delay and still sends 43% fewer requests.
Measurements
Requests/min for one open tab, mock dashboard:
DB statements per check are the same as #2863: 1 per versions check (plus the viewer lookup), against 4 to 14 for each poll it replaced. An away tab runs 6 statements/min.
Worst-case delay before an idle Conversation shows a reply from Slack: present 5s + 2 RTT, away 10s + 2 RTT. The next input checks at once.
Checks
tsc --noEmit, rootpnpm lint(pre-push hook).pnpm test:e2e:dashboard: 112 passed locally before the rebase. After the rebase on main,versions-poll.spec.tspassed 8/8 with--repeat-each 4 --workers 4.No visible UI change.
via @BYK.
--
View Session in Sentry