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
Utilizes a pooled array builder when computing tag helper spans, reducing memory allocations.
Avoids calling into the legacy `GetTagHelperSpans` method, further improving performance by avoiding allocations of `TagHelperSpanVisitor`.
In addition, returns `SourceSpans` rather than `TagHelperSpanInternal` since tooling doesn't use the tag helper binding info.
Copy file name to clipboardExpand all lines: src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/RazorCodeDocumentExtensions.CachedData.cs
+23-3Lines changed: 23 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,8 @@
7
7
usingSystem.Runtime.CompilerServices;
8
8
usingSystem.Threading;
9
9
usingMicrosoft.AspNetCore.Razor.Language.Legacy;
10
+
usingMicrosoft.AspNetCore.Razor.Language.Syntax;
11
+
usingMicrosoft.AspNetCore.Razor.PooledObjects;
10
12
usingMicrosoft.CodeAnalysis;
11
13
usingMicrosoft.CodeAnalysis.CSharp;
12
14
usingMicrosoft.CodeAnalysis.Razor.Threading;
@@ -40,7 +42,7 @@ private sealed class CachedData(RazorCodeDocument codeDocument)
0 commit comments