-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Windows] Improve performance of ContentPanel.EnsureBorderPath
#22346
[Windows] Improve performance of ContentPanel.EnsureBorderPath
#22346
Conversation
|
||
_borderPath.UpdatePath(_borderStroke?.Shape, width, height); | ||
UpdateClip(_borderStroke?.Shape, width, height); | ||
} | ||
|
||
internal void EnsureBorderPath() | ||
internal void EnsureBorderPath(bool containsCheck = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also invoked from
handler.PlatformView.EnsureBorderPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I believe one cannot use containsCheck = false
there though so I did not do it.
If it is not what you meant, please clarify.
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. |
ContentPanel
performanceContentPanel
performance regarding EnsureBorderPath
ContentPanel
performance regarding EnsureBorderPath
ContentPanel.EnsureBorderPath
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Could you update again the Speedscope comparison screenshot? |
|
||
_borderPath.UpdatePath(_borderStroke?.Shape, width, height); | ||
UpdateClip(_borderStroke?.Shape, width, height); | ||
} | ||
|
||
internal void EnsureBorderPath() | ||
internal void EnsureBorderPath(bool containsCheck = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also invoked from
handler.PlatformView.EnsureBorderPath(); |
Description of Change
This PR is a simple performance improvement for
ContentPanel
on Windows.The main change is in the 3rd commit (5056720), previous commits fix code style.
Performance comparison
Speedscope comparing main and this PR using testing code (main, PR):
How to repeat:
and click
Batch Add Borders
button FIVE times.Issues Fixed
Contributes to #21087