Skip to content

Perf: parse/analyze execution plans off the UI thread (Dashboard) (P5)#1117

Merged
erikdarlingdata merged 1 commit into
devfrom
feature/perf-dashboard-plan
Jun 12, 2026
Merged

Perf: parse/analyze execution plans off the UI thread (Dashboard) (P5)#1117
erikdarlingdata merged 1 commit into
devfrom
feature/perf-dashboard-plan

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Opening or pasting an execution plan ran ShowPlanParser.Parse + PlanAnalyzer.Analyze synchronously 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-front XDocument.Parse just to validate (a second full DOM parse).

  • PlanViewerControl.LoadPlan is now async and runs Parse + Analyze in Task.Run; only the render touches the UI.
  • All three callers (OpenPlanTab, LoadPlanIntoSubTab, Ctrl+V paste) drop the redundant validation parse and catch the XmlException the 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

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>
@erikdarlingdata erikdarlingdata merged commit 33dc942 into dev Jun 12, 2026
@erikdarlingdata erikdarlingdata deleted the feature/perf-dashboard-plan branch June 12, 2026 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant