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
Releasebuild (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 Taskinstead ofasync void(except event handlers)
✅ Simplify Layouts
- Replace deep or redundant nested layouts
- Use
Gridinstead of stackedStackLayouts when possible - Use
CollectionViewinstead of longScrollView
✅ Dispose Resources and Unsubscribe Events
- Use
usingblocks forIDisposableresources - Unsubscribe from events in
OnDisappearingorDispose()
✅ 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.