Skip to content

Small reduction in allocations in DateAndTimeLanguageDetector#76393

Merged
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/DateAndTimeLanguageDetectorAllocations
Dec 13, 2024
Merged

Small reduction in allocations in DateAndTimeLanguageDetector#76393
ToddGrun merged 1 commit intodotnet:mainfrom
ToddGrun:dev/toddgrun/DateAndTimeLanguageDetectorAllocations

Conversation

@ToddGrun
Copy link
Contributor

Previously, this class would obtain the DateTime and DateTimeOffset types from the compilation during construction. This PR defers obtaining that information until it's needed (it's very commonly not)

This is a pretty small benefit, only about 0.2% of allocations during the typing scenario in the csharp editing speedometer test.

*** Previous allocations during typing scenario in csharp editing speedometer test ***
image

Previously, this class would obtain the DateTime and DateTimeOffset types from the compilation during construction. This PR defers obtaining that information until it's needed (it's very commonly not)

This is a pretty small benefit, only about 0.2% of allocations during the typing scenario in the csharp editing speedometer test.
@ToddGrun ToddGrun requested a review from a team as a code owner December 12, 2024 16:31
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead VSCode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants