Closed Bug 1518263 Opened 2 years ago Closed 2 years ago

Use Intl.NumberFormat objects to format numbers in about:memory rather than hand-rolling formatting code or using toLocaleString that will create a fresh formatter object every time it's called

Categories

(Toolkit :: about:memory, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

No description provided.
Attached patch Untested patchSplinter Review
I would much appreciate if you could (if this patch appears right) r+, then test it for me, then land it if you could.  This is a bit afield of my area of work, so I really can't spare effort here.  :-)
Attachment #9034808 - Flags: review?(cam)

On current mozilla-central we spend 19 ms under formatNum for a particular, large memory report file, and with this patch it's 29 ms. The time is still pretty reasonable so I think we should take it. Thanks!

Attachment #9034808 - Flags: review?(cam) → review+

Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3131c1c9f3c5
Use Intl.NumberFormat objects to format numbers in about:memory rather than hand-rolling formatting code or using toLocaleString that will create a fresh formatter object every time it's called. r=heycam

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.