Perf: parse/analyze execution plans off the UI thread (Dashboard) (P5)#1117
Merged
Conversation
Opening or pasting an execution plan ran ShowPlanParser.Parse + PlanAnalyzer.Analyze synchronously on the dispatcher — two heavy passes over showplan XML that is routinely multi-MB, freezing the window for seconds. Each call site also did a redundant up-front XDocument.Parse purely to validate (a second full DOM parse). - PlanViewerControl.LoadPlan is now async and runs Parse + Analyze inside Task.Run; only the render touches the UI. - The three callers (OpenPlanTab, LoadPlanIntoSubTab, Ctrl+V paste handler) drop the redundant XDocument.Parse validation and instead catch the XmlException that ShowPlanParser.Parse already throws for malformed XML, plus a general catch so a bad plan shows a message box instead of faulting. Build: Dashboard builds clean (net10); Dashboard.Tests 482/482. 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.
Opening or pasting an execution plan ran
ShowPlanParser.Parse+PlanAnalyzer.Analyzesynchronously on the dispatcher — two heavy passes over showplan XML that's routinely multi-MB, freezing the window for seconds. Each call site also did a redundant up-frontXDocument.Parsejust to validate (a second full DOM parse).PlanViewerControl.LoadPlanis now async and runs Parse + Analyze inTask.Run; only the render touches the UI.OpenPlanTab,LoadPlanIntoSubTab, Ctrl+V paste) drop the redundant validation parse and catch theXmlExceptionthe parser already throws for malformed XML (plus a general catch so a bad plan shows a message box instead of faulting).Build: Dashboard clean (net10); Dashboard.Tests 482/482.
🤖 Generated with Claude Code