Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(compiler): use a shared interpolation regex (#34332)
The template parser has a certain interpolation config associated with it and builds a regular expression each time it needs to extract the interpolations from an input string. Since the interpolation config is typically the default of `{{` and `}}`, the regular expression doesn't have to be recreated each time. Therefore, this commit creates only a single regular expression instance that is used for the default configuration. In a large compilation unit with big templates, computing the regular expression took circa 275ms. This change reduces this to effectively zero. PR Close #34332
- Loading branch information