Move default locale and time zone cache from JS to C++
Categories
(Core :: JavaScript: Internationalization API, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox142 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(4 external files)
Move localeCache and timeZoneCache from selfhosted JS to C++. This avoids multiple JS -> C++ to get default locale resp. time zone and allows to re-use more code from Temporal.
| Assignee | ||
Comment 1•1 year ago
|
||
Using a Vector requires less code, because it's no longer necessary to
manually check that the string fits into the buffer. Give the vector the same
stack storage size as the previous array, so there aren't any extra
allocations.
Part 2 will use the same approach for caching the system time zone.
| Assignee | ||
Comment 2•1 year ago
|
||
Cache the system time zone identifier to avoid repeatedly calling into ICU.
This avoids performing char16_t to char conversions, because the time zone
identifier is guaranteed to be ASCII-only, even though ICU returns it as a
char16_t string.
| Assignee | ||
Comment 3•1 year ago
|
||
Moves the default locale cache from JS to C++. Getting the default locale is
now about twice as fast as before, because there are now fewer JS->C++ calls.
| Assignee | ||
Comment 4•1 year ago
|
||
Getting the default time zone is now also twice as fast, similar to the
improvements from the previous part. And this allows to reuse more code
from Temporal.
Comment 7•1 year ago
•
|
||
Backed out for causing SM bustages failures at DateTime.h
- Backout link
- Failure line:
/builds/worker/checkouts/gecko/js/src/vm/DateTime.h:73:27: error: no member named 'intl' in namespace 'mozilla'
| Assignee | ||
Updated•1 year ago
|
Comment 9•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/b1e4c1e9bea3
https://hg.mozilla.org/mozilla-central/rev/13612c37af8d
https://hg.mozilla.org/mozilla-central/rev/b2c4068a2448
https://hg.mozilla.org/mozilla-central/rev/56af048b065d
Updated•1 year ago
|
Description
•