Closed
Bug 1435325
Opened 6 years ago
Closed 6 years ago
Cache URelativeDateTimeFormatter for Intl.RelativeTimeFormatObject instances
Categories
(Core :: JavaScript: Internationalization API, enhancement, P3)
Core
JavaScript: Internationalization API
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file)
12.60 KB,
patch
|
zbraniecki
:
review+
|
Details | Diff | Splinter Review |
Caching URelativeDateTimeFormatter avoids creating new ones for every call to Intl.RelativeTimeFormatObject.prototype.format().
Assignee | ||
Comment 1•6 years ago
|
||
Adds caching for URelativeDateTimeFormatter to Intl.RelativeTimeFormat. I've also changed |intl_FormatRelativeTime()| to pass the Intl.RelativeTimeFormat's type from JS->C++, because that avoids a slow-ish C++->JS call when calling |GetInternalsObject()|. And I've changed some lines so they don't exceed the 99 chars per line limit.
Attachment #8947924 -
Flags: review?(gandalf)
Comment 2•6 years ago
|
||
Comment on attachment 8947924 [details] [diff] [review] bug1435325.patch lgtm!
Attachment #8947924 -
Flags: review?(gandalf) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a07f087bead65bab769c178c3d7806a1acf3045
Keywords: checkin-needed
Pushed by nbeleuzu@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/af6cc52c9b8b Cache URelativeDateTimeFormatter in Intl.RelativeTimeFormat. r=gandalf
Keywords: checkin-needed
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/af6cc52c9b8b
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in
before you can comment on or make changes to this bug.
Description
•