GetTypeByMetadataName would benefit greatly from non-alloc optimizations. #68343
Labels
Area-Compilers
Area-Performance
Tenet-Performance
Regression in measured performance of the product from goals.
Milestone
I'm seeing enormous allocations in GetTypeByMetadataName, exacerbated by how many analyzers that run now that need to look up special types. When typing in Roslyn.sln i see the following for example:
This is 600 MB of allocs of strings while just typing a few characters. The core issue here is that we are being fed in large named strings, and continually breaking them into tiny garbage substrings:
Moving to an approach where we used
ReadOnlyMemory<char>
here to refer to sub spans of the string could be greatly beneficial. I'm suggesting ROM over Span here as lots of places where we need these substrings are when looking up into maps currently keyed by strings. Span won't work there given it's ref-struct nature. But ROM would be a viable option there to keep things working.The text was updated successfully, but these errors were encountered: