Update MAUI to use Dot.Net 7 makes everything extremely slow
I updated the .csproj file to use 7.0. When I did that running the emulator takes now about 5 mins to show. Using my phone takes even longer. There are no code changes.
I put breakpoints to show that the app is actually loading and they show and once the breakpoint is shown then the wait begins.
Ok so I put console.writes in to see what was going on and for those I got:
[DOTNET] ******************** init the app12:45:27.3111314
[DOTNET] ******************** main page construct12:45:37.8230713
[DOTNET] ******************** go to page12:45:40.7025474
[DOTNET] ******************** init the Scheduler view12:45:40.7034439
[DOTNET] ******************** init the Scheduler view12:45:40.8500713
[DOTNET] ******************** end of go to page12:45:40.8502941
[DOTNET] **************** get appointments12:45:43.6064273
[DOTNET] **************** get appointments done12:45:43.8353050
This shows that after the app is init it takes 16 seconds then it should show (it does show the splash)
I believe this is the problem, after the get appointment I get pages and pages (output window) of the following:
[name.NHLMauiAp] Explicit concurrent copying GC freed 5845(369KB) AllocSpace objects, 39(776KB) LOS objects, 49% free, 6092KB/11MB, paused 10us,9us total 9.313ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 81436(2045KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,9us total 9.144ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 77103(1937KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,8us total 9.326ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 76147(1905KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,6us total 9.386ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 77035(1937KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 14us,9us total 10.427ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 80159(2034KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 7us,7us total 10.266ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 76147(1905KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 19us,10us total 13.205ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 76147(1905KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,7us total 9.574ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 80083(2001KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,7us total 9.053ms
[name.NHLMauiAp] Explicit concurrent copying GC freed 77099(1937KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 6080KB/11MB, paused 8us,6us total 7.847ms
I ran using dot.net 6 and all those do not show so I believe that is the problem.
Any ideas?