Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimizations to the calltree under ExpandPropertiesLeaveEscaped - PR #…
…6128 Context Property expansion has been identified as one of the hot spots in project evaluation and ExpandPropertiesLeaveEscaped alone accounts for almost 20% of overall evaluation time of simple projects. Several optimizations have been made to the calltree under ExpandPropertiesLeaveEscaped. Notably: - Unnecessary and counter-productive string pinning has been removed. - A slow strchr-like function has been replaced with a simple call to String.IndexOf. - Series of ifs have been replaced with a switch. - Allocation of List<object> results has been eliminated. - Allocation of temporary substrings extracted from the expression has been eliminated. - The combined performance win is 10% in ExpandPropertiesLeaveEscaped, so close to 2% for evaluation overall.
- Loading branch information