Skip to content

AnalyzerDriver should not allocate in proportion to the number of symbols declared #37532

@agocke

Description

@agocke

The analyzer driver currently allocates a new closure and delegate for every symbol declared:

private static Action<Diagnostic> GetAddDiagnostic(

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions