MAUIverse MAUIverse

.NET MAUI: Painfully Slow Debugging Resolved with Speedscope

During a Xamarin.Forms to MAUI migration, one view that built in about 10 seconds in Debug on the old stack was taking 50 seconds on MAUI, on a big but slow Android device. Jean-Marie opened an issue on the dotnet/maui repo, and Jonathan Peppers asked for a speedscope trace.

The post shows how that trace is captured with the .NET 8 procedure and viewed by dropping the file onto speedscope.app. The profile put nearly all the time in LoadFromXaml, which led to the finding that XAML isn’t compiled in Debug by default.

The TL;DR: if Debug startup or view construction feels painfully slow, set _MauiForceXamlCForDebug to true in a Debug-conditioned PropertyGroup in your csproj. It’s worth a look for anyone profiling a large MAUI app, and the linked GitHub issues add the full context.

View Source →

← Back to Community Feed

}