Skip to content

Add performance instrumentation, caching, and parallelization#509

Merged
erikdarlingdata merged 2 commits intodevfrom
feature/perf-instrumentation
Mar 10, 2026
Merged

Add performance instrumentation, caching, and parallelization#509
erikdarlingdata merged 2 commits intodevfrom
feature/perf-instrumentation

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Performance profilers: Port MethodProfiler and QueryLogger from Dashboard to Lite — logs slow methods (>500ms) and slow DuckDB queries with daily rotating files and 7-day cleanup
  • Server inventory caching: 5-minute in-memory cache in both Dashboard and Lite eliminates 12s repeat loads when revisiting the FinOps tab
  • Parallel data loading: LoadPerServerDataAsync (4 sub-loads) and LoadUtilizationAsync (4 inner queries) now use Task.WhenAll in both apps
  • Query timing: Added instrumentation to 7 LocalDataService methods for DuckDB query performance visibility
  • Dashboard Plan Viewer fix: PreviewMouseDown no longer steals focus from ComboBox/DataGrid (complements Lite fix from Fix ComboBox focus steal in plan viewer + DOP 2 skew threshold #508)

Test plan

  • Both apps build clean (0 warnings, 0 errors)
  • Lite MethodProfiler logs slow methods correctly
  • Server inventory cache returns instantly on repeat FinOps tab visits
  • No new SlowQueries log entries (all DuckDB queries under 500ms)
  • Verify Dashboard Plan Viewer ComboBox statement selection works in multi-statement plans

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits March 10, 2026 09:03
- Port MethodProfiler and QueryLogger from Dashboard to Lite for
  identifying slow methods and DuckDB queries (500ms threshold,
  daily rotating logs with 7-day cleanup)
- Add 5-minute server inventory cache to both Dashboard and Lite
  to eliminate 12s repeat loads on FinOps tab revisits
- Parallelize LoadPerServerDataAsync (4 sub-loads) and
  LoadUtilizationAsync (4 inner queries) with Task.WhenAll
  in both Dashboard and Lite
- Add query timing instrumentation to 7 LocalDataService methods
- Fix Plan Viewer PreviewMouseDown stealing focus from ComboBox
  and DataGrid in Dashboard (complements Lite fix from #508)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Task.WhenAll didn't improve performance (same DuckDB read lock
bottleneck) and risks concurrency issues at scale. Reverted to
sequential awaits in LoadPerServerDataAsync and LoadUtilizationAsync
in both Dashboard and Lite. Caching and instrumentation retained.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 3a7a98f into dev Mar 10, 2026
3 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/perf-instrumentation branch April 9, 2026 00:33
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