Skip to content

perf: startup optimization + consolidate remaining duplicated code#424

Merged
rygel merged 3 commits intodevelopfrom
perf/startup-optimization
Mar 22, 2026
Merged

perf: startup optimization + consolidate remaining duplicated code#424
rygel merged 3 commits intodevelopfrom
perf/startup-optimization

Conversation

@rygel
Copy link
Copy Markdown
Owner

@rygel rygel commented Mar 22, 2026

Summary

Startup performance

  • Eliminated 5 redundant health checks on startup (7 HTTP calls → 2)
  • Data appears in <1 second when Monitor is already running
  • Deleted RapidPollUntilDataAvailableAsync (128 lines of dead polling)
  • Contract check runs in background (non-blocking)

Code deduplication

  • Consolidated BuildTooltipContent, ResolveResetTimes, GetDetailSortOrder,
    GetDetailDisplayName, GetDetailDisplayValue into MainWindowRuntimeLogic (10 copies → 5 methods)
  • Extracted GetResourceBrush to shared UIHelper
  • Fixed unthemed update progress window (caught by theme test)

124 insertions, 198 deletions from tooltip consolidation alone.

Test plan

  • Build succeeds
  • 927 tests pass (925 + 2 theme tests caught real bug)
  • Manual: restart UI — data appears in <1s
  • CI checks pass

🤖 Generated with Claude Code

actions-user and others added 3 commits March 22, 2026 13:48
…timeLogic

Moved from ProviderCardRenderer + ProviderCardViewModel:
- BuildTooltipContent (2 copies → 1)
- ResolveResetTimes (2 copies → 1)
- GetDetailDisplayName (2 copies → 1)
- GetDetailDisplayValue (2 copies → 1)
- GetDetailSortOrder (3 copies → 1, made internal in Presentation)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MainWindow and CollapsibleSectionViewModel now delegate to UIHelper.
Converters keep their own fallbacks (converter-specific defaults).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Theme test correctly caught the update download progress window having
no Background set (white on dark theme). Fixed with GetResourceBrush.

Also updated test to recognize GetResourceBrush and UIHelper as
valid theme-aware patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rygel rygel merged commit 1de5f6b into develop Mar 22, 2026
16 of 17 checks passed
@rygel rygel deleted the perf/startup-optimization branch March 22, 2026 12:06
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.

2 participants