Open sharwell opened 1 year ago
values.Collect(value1).Collect(value2)
Combine
not Collect
, right?
📝 Before implementing this rule as an analyzer, we will investigate if it's possible for the incremental generator driver to perform the optimization by simply never caching the output of Combine
if it's only used by a downstream call to Combine
.
Describe the problem you are trying to solve
When combining
IIncrementalValuesProvider<T>
with two or moreIIncrementalValueProvider<T>
instances, the manner in which the values are combined can impact cache sizes.Describe suggestions on how to achieve the rule
Identify cases where the following pattern is used:
Suggest to rewrite as:
Additional context
https://github.com/dotnet/roslyn-analyzers/commit/e9db5f601bb5a676dc078d90ac26488846f09691