-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Labels
area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterlayout-gridperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/windowst/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
I have a non-trivial grid which I create by hand (not in XAML but by code) and it can easily take hundreds of milliseconds to show such a grid.
Steps to Reproduce
- Fetch https://github.com/MartyIX/maui/tree/feature/2024-04-11-grid-perf (MartyIX@dbb147d)
cd src/Controls/samples/Controls.Sample.Sandbox
dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:PublishReadyToRun=false -p:WindowsPackageType=None
dotnet trace collect --format speedscope -- .\bin\Release\net8.0-windows10.0.19041.0\win10-x64\publish\Maui.Controls.Sample.Sandbox.exe
- Click "Generate Grid" to generate a 30x30 grid and see how long it took.
It can take 900 ms, and then it speeds up after a several clicks to about 600 ms but it does not drop under that bound.
Speedscope
Maui.Controls.Sample.Sandbox.exe_20240411_223826.speedscope.json
From the data, it's clear that
public static void AddWithSpan(this Grid grid, IView view, int row = 0, int column = 0, int rowSpan = 1, int columnSpan = 1) |
Link to public reproduction project repository
https://github.com/MartyIX/maui/tree/feature/2024-04-11-grid-perf
Version with bug
8.0.20 SR4
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows 10, Windows 11
Did you find any workaround?
No.
Relevant log output
No response
Vroomer and bronteq
Metadata
Metadata
Assignees
Labels
area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterlayout-gridperf/generalThe issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)platform/windowst/bugSomething isn't workingSomething isn't working