• A
    Add cache for GetTypeByMetadataName (#28778) · d84e0a04
    Andy Gocke 提交于
    This seems to be a popular call among analyzers, especially XUnit. It's a
    reasonable way to acquire a well-known analyzer type, but analyzers often
    don't save the resulting symbol. This causes significant CPU work to be done
    repeatedly as XUnit looks for the same symbol over and over, passing in the
    same type name each time.
    
    A very small, simple cache seems to solve the problem without requiring any
    changes on the XUnit side.
    d84e0a04
ConcurrentCache.cs 2.3 KB