angular/packages/compiler/src/expression_parser
JoostK 014a7137f4 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
2019-12-12 14:06:37 -08:00
..
ast.ts fix(ivy): don't crash on unknown pipe (#33454) 2019-10-31 23:43:32 +00:00
lexer.ts style(compiler): typo fix (#26934) 2018-11-05 09:49:22 -08:00
parser.ts perf(compiler): use a shared interpolation regex (#34332) 2019-12-12 14:06:37 -08:00