Skip to content

Remove a few allocations from GridLengthTypeConverter#22095

Closed
MartyIX wants to merge 1 commit into
dotnet:mainfrom
MartyIX:feature/2024-04-27-GridLengthTypeConverter-perf
Closed

Remove a few allocations from GridLengthTypeConverter#22095
MartyIX wants to merge 1 commit into
dotnet:mainfrom
MartyIX:feature/2024-04-27-GridLengthTypeConverter-perf

Conversation

@MartyIX

@MartyIX MartyIX commented Apr 27, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor

see my existing PR here: #20048

@symbiogenesis

symbiogenesis commented Apr 27, 2024

Copy link
Copy Markdown
Contributor

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

@MartyIX MartyIX closed this Apr 27, 2024
@MartyIX

MartyIX commented Apr 27, 2024

Copy link
Copy Markdown
Contributor Author

I see.

@Eilon Eilon added perf/general 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 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