Perf: Dashboard timer re-entrancy guards + installed-version cache (P3)#1115
Merged
Conversation
- Add an in-flight guard to the three async-void DispatcherTimer ticks (LandingPage NOC refresh, MainWindow connection-status, MainWindow alert check). At the 10s minimum interval a slow server (10s command timeouts, 5s connect retries) makes a tick outlast its interval, so ticks overlapped and stacked unbounded refresh/alert sweeps, each opening its own connections. - ServerManager.CheckConnectionAsync no longer re-runs the installation_history version query on every connection-check tick — the installed monitor version can't change mid-session, so it's carried forward once known. Build: Dashboard builds clean (net10); Dashboard.Tests 482/482. Flagged (not in this PR): the "NOC Refresh Interval" setting is dead — the NOC timer uses AutoRefreshIntervalSeconds, not NocRefreshIntervalSeconds. Wiring it vs removing the setting+UI is a product decision (your call). The per-tick `new DatabaseService(...)` per server remains, but with the guards ticks no longer overlap, so it no longer stacks connections. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Dashboard timer/throttle fixes (P3).
async voidDispatcherTimerticks (LandingPage NOC refresh, MainWindow connection-status, MainWindow alert check). At the 10s minimum interval a slow server makes a tick outlast its interval, so ticks overlapped and stacked unbounded refresh/alert sweeps, each opening its own connections.CheckConnectionAsyncno longer re-runs theinstallation_historyquery every connection-check tick — the version can't change mid-session, so it's carried forward once known.Build: Dashboard clean (net10); Dashboard.Tests 482/482.
Flagged (your call): the NOC Refresh Interval setting is dead — the NOC timer uses
AutoRefreshIntervalSeconds, notNocRefreshIntervalSeconds. Wire it vs remove the setting+UI is a product decision. The per-ticknew DatabaseServiceper server remains, but with the guards ticks no longer overlap so it no longer stacks connections.🤖 Generated with Claude Code