AnalyzerDriver should not allocate in proportion to the number of symbols declared #37532
Labels
Area-Analyzers
Area-Compilers
Tenet-Performance
Regression in measured performance of the product from goals.
Milestone
The analyzer driver currently allocates a new closure and delegate for every symbol declared:
roslyn/src/Compilers/Core/Portable/DiagnosticAnalyzer/AnalyzerExecutor.cs
Line 1578 in 32149eb
This is one example of a couple of places where we allocate memory in proportion of the number of symbols declared in the compilation. Symbols are extremely common in the compiler and this can represent a very heavy allocation burden. We should try to make all analyzer APIs allocate a constant amount when possible, or re-use as many allocations as possible.
The text was updated successfully, but these errors were encountered: