maui icon indicating copy to clipboard operation
maui copied to clipboard

[Windows] Improve performance of `ContentPanel.EnsureBorderPath`

Open MartyIX opened this issue 1 year ago • 3 comments

Description of Change

This PR is a simple performance improvement for ContentPanel on Windows.

The main change is in the 3rd commit (50567205e9d18a4281ad8890106d11fa4594fdb9), previous commits fix code style.

Performance comparison

Speedscope comparing main and this PR using testing code (main, PR):

image

How to repeat:

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

and click Batch Add Borders button FIVE times.

Issues Fixed

Contributes to #21087

MartyIX avatar May 11 '24 20:05 MartyIX

Hey there @MartyIX! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

/azp run

jsuarezruiz avatar May 13 '24 05:05 jsuarezruiz

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar May 13 '24 05:05 azure-pipelines[bot]

Could you update again the Speedscope comparison screenshot?

jsuarezruiz avatar May 13 '24 09:05 jsuarezruiz

Here is the original one:

329810830-a613d26d-2bb6-47f6-a920-67bbf78f27f8

Or do you mean a new one?

MartyIX avatar May 13 '24 11:05 MartyIX