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

Small reduction in allocations in DateAndTimeLanguageDetector #76393

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
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 12, 2024
@ToddGrun ToddGrun merged commit e42a7b6 into dotnet:main Dec 13, 2024
25 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Dec 13, 2024
@dibarbet dibarbet modified the milestones: Next, 17.13 P3 Jan 7, 2025
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