diff options
author | Fadi Hanna <fadim@microsoft.com> | 2017-05-19 02:14:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 02:14:57 +0300 |
commit | 5965b5f6980ecb2620bb0db25c0073c80079a3e4 (patch) | |
tree | e221248b40be1f42df69d956079f8fa97e663501 /src | |
parent | 0166403cf2d2cb8eb4f75084a520afbb0fd822ff (diff) |
Fixing the processing of dynamic dependencies to not recompute already computed results (90% perf improvement on Release builds for the ASPNet benchmark app (22 mins to 2 mins total compile time) (#3652)
Diffstat (limited to 'src')
-rw-r--r-- | src/ILCompiler.DependencyAnalysisFramework/src/DependencyAnalyzer.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyAnalyzer.cs b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyAnalyzer.cs index 88ac931fc..446b51ff1 100644 --- a/src/ILCompiler.DependencyAnalysisFramework/src/DependencyAnalyzer.cs +++ b/src/ILCompiler.DependencyAnalysisFramework/src/DependencyAnalyzer.cs @@ -230,9 +230,13 @@ namespace ILCompiler.DependencyAnalysisFramework if (_newDynamicDependenciesMayHaveAppeared) { _newDynamicDependenciesMayHaveAppeared = false; - foreach (DynamicDependencyNode dynamicNode in _markedNodesWithDynamicDependencies) + for (int i = 0; i < _markedNodesWithDynamicDependencies.Count; i++) { + DynamicDependencyNode dynamicNode = _markedNodesWithDynamicDependencies[i]; dynamicNode.MarkNewDynamicDependencies(this); + + // Update the copy in the list + _markedNodesWithDynamicDependencies[i] = dynamicNode; } } } while (_markStack.Count != 0); |