canmove, Confirmed users
1,448
edits
| Line 39: | Line 39: | ||
* Hardcode formatted translations in l20n-chrome-xul | * Hardcode formatted translations in l20n-chrome-xul | ||
* Throw errors and collect them in a <code>try…catch</code>. | * Throw errors and collect them in a <code>try…catch</code>. | ||
I found three major bottlenecks: | |||
* destructuring assignment is slow in hotter loops, | |||
* formatting traits bails out of the simple-string optimization because the entire trait object is passed to format() instead of its <code>val</code>, | |||
* formatting entities with null values and no default traits is slow because we check each trait if it's a default one deep in the generator-enabled code of MessageContext; we could make this check much earlier. | |||