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 (notDebug
) 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 ofasync void
(except event handlers)
✅ Simplify Layouts
- Replace deep or redundant nested layouts
- Use
Grid
instead of stackedStackLayout
s when possible - Use
CollectionView
instead of longScrollView
✅ Dispose Resources and Unsubscribe Events
- Use
using
blocks forIDisposable
resources - Unsubscribe from events in
OnDisappearing
orDispose()
✅ 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.