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

Switch TextDocumentState.GetTextVersionAsync to ValueTask to reduce allocations. #77213

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ToddGrun
Copy link
Contributor

@ToddGrun ToddGrun commented Feb 13, 2025

The task creation from calling this method accounts for ~36 MB (0.2%) of allocations in the CSharpEditingTests.Completion speedometer test.

Results from speedometer run linked below (filtered to devenv;TypeTaskVersionStamp)

*** BEFORE ***
image

*** AFTER ***
image

…uce allocations.

The task creation from calling this method accounts for 34 MB (0.2%) of allocations in the CSharpEditingTests.Completion speedometer test.

Going to run a test insertion to verify that this gets rid of the majority of these allocations before proceeding.
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 13, 2025
@ToddGrun
Copy link
Contributor Author

Was finally able to get a test insertion run after Ankita's PR validation fix

https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/612409

Results look good, will update PR description and move out of draft status

@ToddGrun ToddGrun changed the title WIP: Switch TextDocumentState.GetTextVersionAsync to ValueTask to reduce allocations. Switch TextDocumentState.GetTextVersionAsync to ValueTask to reduce allocations. Feb 20, 2025
@ToddGrun ToddGrun marked this pull request as ready for review February 20, 2025 14:42
@ToddGrun ToddGrun requested a review from a team as a code owner February 20, 2025 14:42
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