Open sharwell opened 4 years ago
FWIW, still repros in 16.5 Preview 3.
😨 This was responsible for 3.5GiB allocations in a 100 second performance trace taken with 16.9 Preview 2 (IntPreview 1a8a5724).
Any suggestions on an alternate path to take? If this is a PEReference we could attempt to crack it open directly. But that seems non-ideal. Esp. as i would hope we could get an IAssemblySymbol cheaply to do this check. Should this maybe go to compiler to see if htey can mkae things faster or more lightweight here?
The
DependentProjectsFinder.GetAssemblyReferenceType
method obtains an assembly or module symbol here:https://github.com/dotnet/roslyn/blob/e0567782254976e12f4a27444c3c0e82a91ae584/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentProjectsFinder.cs#L458
This symbol is passed to a predicate, where the only actual use of this predicate is the following:
https://github.com/dotnet/roslyn/blob/e0567782254976e12f4a27444c3c0e82a91ae584/src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentProjectsFinder.cs#L419
The
HasReferenceToAssembly
method should be updated to avoid requiring symbol binding to check the name of an assembly.🔗 Originally discovered while investigating internal issue DevDiv 1006914.