Add cache for GetTypeByMetadataName (#28778)
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.
Showing
想要评论请 注册 或 登录