Perf: fix long-session leaks in both apps (P4)#1116
Merged
Conversation
- Dashboard AlertsHistoryContent started a 10s DispatcherTimer in its ctor that was never stopped, so closing the Alerts tab leaked the whole control (and its alert list) per open/close and kept ticking forever. Added Cleanup(), called from CloseTab_Click. - Dashboard _lastLongRunningJobAlert is keyed per job run and was never pruned (Lite already got this fix); now prunes aged-out entries each pass. - Lite SystemTrayService.Initialize re-runs on theme change and re-subscribed MainWindow.StateChanged without removing the old handler, stacking duplicates; now unsubscribes first. - Lite: closing a server tab with plan tabs still open leaked each PlanViewerControl via the static ThemeChanged event (ClosePlanTab_Click only covered the per-tab close button); DisposeChartHelpers now cleans them up. Build: solution clean (net10); Dashboard.Tests 482/482. Flagged (needs design approval): Lite DeltaCalculator accumulates dead plan_handle keys for the session. The correct fix retains only the live keys seen each collection pass (the DMV result is the full live plan cache) — getting it wrong evicts live deltas and causes false delta spikes, so I want your nod on the approach before touching the collector path. 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.
Long-session leak fixes in both apps (P4) — these progressively degrade responsiveness over a multi-hour/day session.
DispatcherTimerstarted in ctor, never stopped → closing the Alerts tab leaked the whole control per open/close and kept ticking. AddedCleanup()fromCloseTab_Click._lastLongRunningJobAlert: per-run keys never pruned (Lite already had this); now prunes aged-out entries.Initializere-runs on theme change and re-subscribedStateChangedwithout removing the old handler; now-=first.PlanViewerControlvia the staticThemeChangedevent;DisposeChartHelpersnow cleans them up.Build: solution clean (net10); Dashboard.Tests 482/482.
Flagged (design approval): Lite
DeltaCalculatoraccumulates deadplan_handlekeys for the session. Correct fix = retain only keys seen each collection pass; getting it wrong evicts live deltas → false spikes, so I want your nod before touching the collector path.🤖 Generated with Claude Code