Skip to content

Startup Performance

David Ortinau edited this page Apr 10, 2025 · 3 revisions

Startup Performance Optimization

Start-up time impacts the first impression of your app. Slower startup is often caused by unnecessary synchronous work.

🔍 What to Look For

  • Heavy logic in MauiProgram.CreateMauiApp()
  • DI container scanning assemblies or loading all services
  • Eager loading of large resource dictionaries or services

🛠 Fix Examples

  • Use lazy registration or Lazy<T> for services
  • Delay non-critical work until after the first screen renders
  • Avoid blocking file IO or HTTP calls in startup code

➡️ Next: Capture a Performance Trace

Clone this wiki locally