Reduce amount of allocations related to tracking used assemblies:#41117
Conversation
AlekseyTs
commented
Jan 21, 2020
- Do not track usage of an assembly being built, it is always filtered out at the end.
- Do not track dependencies when consumer is not interested in them. This mostly affects binding and lowering of an executable code.
|
@AlekseyTs let me know if you'd like me to set up and/or run AnalyzerRunner scenarios for getting concrete numbers. #Resolved |
…e of a core library.
- Do not track usage of an assembly being built, it is always filtered out at the end. - Do not track dependencies when consumer is not interested in them. This mostly affects binding and lowering of an executable code.
62c7875 to
2851fbc
Compare
| return ToBadExpression(expr, resultKind); | ||
| } | ||
|
|
||
| public CompoundUseSiteInfo<AssemblySymbol> GetNewCompoundUseSiteInfo(BindingDiagnosticBag futureDestination) |
There was a problem hiding this comment.
Nit: it doesn't feel like this is the right location for this function. Perhaps in Binder.cs instead, given that it's a general helper? #Resolved
There was a problem hiding this comment.
I had the same reaction. Does this have anything to do with value checks?
In reply to: 369822539 [](ancestors = 369822539)
|
@dotnet/roslyn-compiler, @jcouv Please review, need a second sign-off. #Closed |
1 similar comment
|
@dotnet/roslyn-compiler, @jcouv Please review, need a second sign-off. #Closed |
| return BoundCall.Synthesized(syntax, null, leftTruthOperator, loweredLeft); | ||
| } | ||
|
|
||
| private CompoundUseSiteInfo<AssemblySymbol> GetNewCompoundUseSiteInfo() |
There was a problem hiding this comment.
nit: this method is also oddly situated. It's not related to binary operators. #Resolved
|
I'm embarassed, because I didn't quite spot where we're reducing allocations. |
|
Hum, reading OP again, I think the optimization comes from use of the discard instances. Is that right? #Resolved |
The gain comes from the fact that we create instances that do not accumulate information we do not request. In reply to: 577955908 [](ancestors = 577955908) |
|
I will address feedback on a separate PR in order to expedite an integration from master. #Closed |