dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.05k stars 4.69k forks source link

Investigate/optimize performance of TrimAnalysisPatterns tracked by ILLink Roslyn analyzer #94312

Open sbomer opened 11 months ago

sbomer commented 11 months ago

The ILLink RoslynAnalyzer has various types such as TrimAnalysisMethodCallPattern and TrimAnalysisFieldAccessPattern used to track relevant "patterns" that may produce dataflow warnings. Tracking such values is potentially expensive, especially now that we do it even for values which may not be relevant for dataflow, just to track their types, after https://github.com/dotnet/runtime/pull/93732.

On top of that, https://github.com/dotnet/runtime/pull/94123 is introducing additional context to the tracked patterns to track the "feature context" of the invocation/field access/etc.

We should investigate the performance of this approach and consider ways to optimize it.

Context: https://github.com/dotnet/runtime/pull/94123#discussion_r1379978033

ghost commented 11 months ago

Tagging subscribers to this area: @dotnet/area-meta See info in area-owners.md if you want to be subscribed.

Issue Details
The ILLink RoslynAnalyzer has various types such as `TrimAnalysisMethodCallPattern` and `TrimAnalysisFieldAccessPattern` used to track relevant "patterns" that may produce dataflow warnings. Tracking such values is potentially expensive, especially now that we do it even for values which may not be relevant for dataflow, just to track their types, after https://github.com/dotnet/runtime/pull/93732. We should investigate the performance of this approach and consider ways to optimize it. Context: https://github.com/dotnet/runtime/pull/94123#discussion_r1379978033
Author: sbomer
Assignees: -
Labels: `area-Meta`
Milestone: -
ghost commented 11 months ago

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas See info in area-owners.md if you want to be subscribed.

Issue Details
The ILLink RoslynAnalyzer has various types such as `TrimAnalysisMethodCallPattern` and `TrimAnalysisFieldAccessPattern` used to track relevant "patterns" that may produce dataflow warnings. Tracking such values is potentially expensive, especially now that we do it even for values which may not be relevant for dataflow, just to track their types, after https://github.com/dotnet/runtime/pull/93732. On top of that, https://github.com/dotnet/runtime/pull/94123 is introducing additional context to the tracked patterns to track the "feature context" of the invocation/field access/etc. We should investigate the performance of this approach and consider ways to optimize it. Context: https://github.com/dotnet/runtime/pull/94123#discussion_r1379978033
Author: sbomer
Assignees: -
Labels: `area-Meta`, `untriaged`, `area-Tools-ILLink`
Milestone: -