Profiling the application
When you’ve optimized the obvious things but the app still feels slow, it’s time to use a performance profiler. A profiler can help identify which methods are consuming the most execution time.
While Visual Studio doesn’t provide built-in tools to profile .NET MAUI apps on all supported platforms, there are other tools that can assist us. In this recipe, we’ll profile a .NET MAUI application using VS Code, powered by two extensions: .NET Meteor and speedscope.
Getting ready
You can use any test project and profile it. For example, you can take the project from the Comparing performance in debug and release configurations recipe: https://github.com/PacktPublishing/.NET-MAUI-Cookbook/tree/main/Chapter08/c8-DebugVsRelease.
How to do it…
In this recipe, we will install the .NET Meteor and speedscope extensions in VS Code to collect and analyze profiling data. These tools will help us understand which parts of the...