Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove custom unescaping of static message
Since ICU message format uses apostrophe escaping, our manual unescape becomes very troublesome. There seems to be no significant perf degradation Before: ``` <div> x 2,161,669 ops/sec ±7.87% (71 runs sampled) 100 x <div/> x 16,464 ops/sec ±0.71% (92 runs sampled) 100 x <FormattedNumber> x 2,421 ops/sec ±1.26% (91 runs sampled) 100 x <FormattedDate> x 903 ops/sec ±1.40% (91 runs sampled) 100 x <FormattedMessage> x 340 ops/sec ±11.89% (82 runs sampled) 100 x <FormattedMessage> with placeholder x 91.85 ops/sec ±5.76% (67 runs sampled) 100 x <FormattedMessage> with placeholder in AST form x 223 ops/sec ±3.57% (79 runs sampled) 100 x <FormattedMessage> with placeholder, cached x 505 ops/sec ±5.36% (72 runs sampled) 100 x <FormattedMessage> with placeholder, cached in AST form x 419 ops/sec ±6.04% (80 runs sampled) ``` After: ``` <div> x 2,998,677 ops/sec ±0.57% (90 runs sampled) 100 x <div/> x 15,512 ops/sec ±3.10% (87 runs sampled) 100 x <FormattedNumber> x 2,456 ops/sec ±1.51% (90 runs sampled) 100 x <FormattedDate> x 942 ops/sec ±0.99% (90 runs sampled) 100 x <FormattedMessage> x 358 ops/sec ±3.59% (82 runs sampled) 100 x <FormattedMessage> with placeholder x 103 ops/sec ±3.83% (75 runs sampled) 100 x <FormattedMessage> with placeholder in AST form x 237 ops/sec ±1.51% (82 runs sampled) 100 x <FormattedMessage> with placeholder, cached x 673 ops/sec ±2.15% (87 runs sampled) 100 x <FormattedMessage> with placeholder, cached in AST form x 485 ops/sec ±1.77% (86 runs sampled) ```
- Loading branch information