Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce allocations and UI thread CPU costs in WithDoNotCreateCreation…
…Policy (#75358) This method shows up in the typing scenario in the new csharp editing speedometer test. CPU: This method accounts for 5% of UI thread CPU activity during typing. a) Removed the Enumerable.Count() call accounting for 1.7%. (Local testing showed limited value as there was typically a large number of states to iterate and a low number of syntax trees already realized) Allocations: This method accounts for 7.9% of allocations during typing. a) Removed ImmutableArray.Builder allocations: 0.2% b) Removed most SyntaxTree[] allocations: 0.2% (local testing showed very low hit rate of lazyCompilationWithoutGeneratedDocuments evalutation) c) Removed Enumerable.Count heap allocations due to boxing the ImmutableSortedDictionary enumerator: 0.2%
- Loading branch information