dotnet / linker

388 stars 126 forks source link

Move CheckProcessed filter from ProcessMethod to MarkMethod to avoid adding to _methods queue #3137

Closed jtschuster closed 1 year ago

jtschuster commented 1 year ago

In ProcessMethod, we check for CheckProcessed and exit early if it returns true. We can move that check to MarkMethod and only add the method to the _methods queue if it hasn't already been processed. This will keep _methods from having unnecessary entries. Since the MarkStep._methods field is a very large object, it would be helpful to limit its size when possible.