You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch TextDocumentState.GetTextVersionAsync to ValueTask to reduce allocations. (#77213)
The task creation from calling this method accounts for 36 MB (0.2%) of allocations in the CSharpEditingTests.Completion speedometer test. Speedometer results with this change show marked improvement in these allocations.
Copy file name to clipboardexpand all lines: src/Workspaces/Core/Portable/Workspace/Solution/ProjectState.cs
+4-4
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ public ProjectState(LanguageServices languageServices, ProjectInfo projectInfo,
116
116
DocumentStates=newTextDocumentStates<DocumentState>(projectInfoFixed.Documents, info =>CreateDocument(info,parseOptions,loadTextOptions));
117
117
AdditionalDocumentStates=newTextDocumentStates<AdditionalDocumentState>(projectInfoFixed.AdditionalDocuments, info =>newAdditionalDocumentState(languageServices.SolutionServices,info,loadTextOptions));
0 commit comments