Skip to content

Conversation

@MartyIX
Copy link
Contributor

@MartyIX MartyIX commented Aug 29, 2025

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Performance improvement

image

So this PR should translate to saving about 15 ms in my grid scenario (#21787). I'm not sure why it is so costly but it's like that:

image

Issues Fixed

Contributes to #21787

@MartyIX MartyIX requested a review from a team as a code owner August 29, 2025 06:59
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Aug 29, 2025
@dotnet-policy-service
Copy link
Contributor

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.

@jsuarezruiz jsuarezruiz added area-controls-label Label, Span perf/general The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) labels Aug 29, 2025
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label) =>
public static void MapCharacterSpacing(ILabelHandler handler, ILabel label)
{
if (handler.IsConnectingHandler() && label.CharacterSpacing == 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, avoids setting the default CharacterSpacing value during the initial setup of the control or when is not necessary, which should give a performance boost in scenarios with many labels.

Running a build to verify if not have any impact in some test scenario related with Label.CharacterSpacing.

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@MartyIX
Copy link
Contributor Author

MartyIX commented Aug 29, 2025

@jsuarezruiz It looks like the tests passed.

@StephaneDelcroix StephaneDelcroix merged commit c894dd7 into dotnet:main Sep 3, 2025
130 checks passed
@MartyIX MartyIX deleted the feature/2025-08-29-Windows-perf-character-spacing branch September 3, 2025 07:01
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-label Label, Span community ✨ Community Contribution perf/general The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants