common patterns and fixes - davidortinau/ControlGallery GitHub Wiki
💬 Copilot Chat Prompt
I’ve collected trace and memory data from my .NET MAUI app. Help me interpret the results and suggest fixes for common issues like blocking async calls, layout inefficiencies, memory leaks, and startup delays.
Below are common symptoms and how to address them, with specific examples.
Symptom | Cause | Fix |
---|---|---|
UI hangs on button tap |
.Result or .Wait() blocking async work |
Use await and make calling methods async |
Scrolling is janky | Too many views rendered in a list | Use CollectionView with virtualization |
Memory grows over time | Event or delegate keeps objects alive | Unsubscribe events on page disappear or dispose |
Startup takes >3s | Synchronous work in app init | Defer non-critical work or use lazy services |
For detailed remediation, revisit earlier guides or use the Quick Checklist again.
- Performance best practices in .NET MAUI - GitHub Wiki
- .NET MAUI Issues labeled 'performance'
- .NET Fundamentals Performance Guide
🏁 You're done! Or loop back to re-check another area.