Noticed in customer trace, ~35% of allocations over a nearly two minute period are in razor's sourcegenerator's call to the TagHelperDirectiveVisitor.
As the DirectiveVisitor construction and usage are scoped to the calling method (DefaultRazorTagHelperContextDiscoveryPhase.ExecuteCore), it's easy enough to make the DirectiveVisitor disposable and to make the DirectiveVisitor use a pooled array for it's TagHelperDescriptor array.
Noticed in customer trace, ~35% of allocations over a nearly two minute period are in razor's sourcegenerator's call to the TagHelperDirectiveVisitor.
As the DirectiveVisitor construction and usage are scoped to the calling method (DefaultRazorTagHelperContextDiscoveryPhase.ExecuteCore), it's easy enough to make the DirectiveVisitor disposable and to make the DirectiveVisitor use a pooled array for it's TagHelperDescriptor array.
from the customer trace