Skip to content
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

Remove a few allocations from GridLengthTypeConverter #22095

Conversation

MartyIX
Copy link
Contributor

@MartyIX MartyIX commented Apr 27, 2024

Description of Change

Use Spans to avoid allocations.
I don't believe this will have any significant effect though.

Issues Fixed

Contributes to #21787

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 27, 2024
@MartyIX MartyIX force-pushed the feature/2024-04-27-GridLengthTypeConverter-perf branch 2 times, most recently from 4095fab to 8f5cd2f Compare April 27, 2024 11:14
@MartyIX MartyIX force-pushed the feature/2024-04-27-GridLengthTypeConverter-perf branch from 8f5cd2f to aa2c8fe Compare April 27, 2024 11:20
return new GridLength(1, GridUnitType.Star);
}

#if NETSTANDARD2_0_OR_GREATER
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this "too much"?

@MartyIX MartyIX marked this pull request as ready for review April 27, 2024 11:23
@MartyIX MartyIX requested a review from a team as a code owner April 27, 2024 11:23
@MartyIX MartyIX added the legacy-area-perf Startup / Runtime performance label Apr 27, 2024
@symbiogenesis
Copy link
Contributor

see my existing PR here: #20048

@symbiogenesis
Copy link
Contributor

symbiogenesis commented Apr 27, 2024

It only affects things on the order of microseconds. Allocations are improved, though.

@MartyIX MartyIX closed this Apr 27, 2024
@MartyIX
Copy link
Contributor Author

MartyIX commented Apr 27, 2024

I see.

@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter community ✨ Community Contribution t/perf 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