Quick Checklist - davidortinau/ControlGallery GitHub Wiki

Quick Checklist: Before You Profile

These are simple checks and fixes you can apply before diving into profiling tools. Most performance problems come down to a few common mistakes.

Use a Release Build

  • Confirm you’re running a Release build (not Debug) on the device
  • Enable AOT and linker trimming

Avoid UI Thread Blocking

  • Don’t use .Result, .Wait(), or .GetAwaiter().GetResult() on Tasks
  • Use async Task instead of async void (except event handlers)

Simplify Layouts

  • Replace deep or redundant nested layouts
  • Use Grid instead of stacked StackLayouts when possible
  • Use CollectionView instead of long ScrollView

Dispose Resources and Unsubscribe Events

  • Use using blocks for IDisposable resources
  • Unsubscribe from events in OnDisappearing or Dispose()

Optimize Images

  • Use right-sized image assets (avoid huge images for small views)
  • Use SVG or vector images where applicable
  • Enable caching for UriImageSource

Defer Startup Work

  • Don’t load data or services synchronously in CreateMauiApp()
  • Lazy-load large resources or dictionaries

If the problem persists after this, continue to a deep-dive guide.

➡️ Next: Validate Async/Await and UI Responsiveness