You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a continuation of ongoing perf work, this issue tracks perf improvement opportunities.
Calling PEReaderExtensions.GetMetadataReader is apparently quite slow because of some in-memory buffer copies. We can pool and recycle the result of this call.
TryGetEnumName exhaustively searches all enum values in the metadata on every call. On subsequent generations, we should be able to reuse the result of this search rather than repeating it.
GetMethodsByName spends a lot of time concatenating strings and in 3 dictionary lookups per namespace in the search. We may be able to consolidate this to just 1 dictionary lookup with no string concatenation.
TryGenerateConstant spends a lot of time in direct dictionary lookups (one lookup per namespace searched). We might be able to get this down to just one lookup.
TryGenerateType spends a lot of time in direct dictionary lookups (one lookup per namespace searched). We might be able to get this down to just one lookup.
SyntaxNode.GetText, which renders the syntax tree to a SourceText, takes a significant amount of time (as of course does the production of the syntax tree. If we could cache this and safely determine when we can reuse it, that would be supreme.
Some of these items come from this table.
See also #244 for prior work in this area.
As a continuation of ongoing perf work, this issue tracks perf improvement opportunities.
PEReaderExtensions.GetMetadataReaderis apparently quite slow because of some in-memory buffer copies. We can pool and recycle the result of this call.TryGetEnumNameexhaustively searches all enum values in the metadata on every call. On subsequent generations, we should be able to reuse the result of this search rather than repeating it.GetMethodsByNamespends a lot of time concatenating strings and in 3 dictionary lookups per namespace in the search. We may be able to consolidate this to just 1 dictionary lookup with no string concatenation.TryGenerateConstantspends a lot of time in direct dictionary lookups (one lookup per namespace searched). We might be able to get this down to just one lookup.TryGenerateTypespends a lot of time in direct dictionary lookups (one lookup per namespace searched). We might be able to get this down to just one lookup.SyntaxNode.GetText, which renders the syntax tree to a SourceText, takes a significant amount of time (as of course does the production of the syntax tree. If we could cache this and safely determine when we can reuse it, that would be supreme.Some of these items come from this table.
See also #244 for prior work in this area.