dotnet / linker

388 stars 126 forks source link

Investigate why there are twice as many ParameterDefinitionCollections as MethodDefinition on the heap #3138

Closed jtschuster closed 1 year ago

jtschuster commented 1 year ago

When profiling the memory usage for https://github.com/dotnet/linker/issues/3126, I found there are about twice as many instances of ParameterDefinitionCollection as MethodDefinition, which doesn't seem to make sense if a MethodDefinition should have a single ParameterDefinitionCollection. They are taking a significant amount of memory in the heap, so it would be beneficial to be able to remove any duplicates we have.

jtschuster commented 1 year ago

MethodReference's also have ParameterDefinitionCollection's, forgot about that...