Closed
Bug 1603276
Opened 4 years ago
Closed 4 years ago
`toLocaleTimeString` allocate massive amounts of memory
Categories
(DevTools :: Netmonitor, defect, P3)
DevTools
Netmonitor
Tracking
(Performance Impact:low, firefox73 fixed)
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: Harald, Assigned: Harald)
References
(Blocks 1 open bug)
Details
(Keywords: perf, perf:responsiveness)
Attachments
(2 files)
Using http://tankanarchy.herokuapp.com/ generating many WS logs leads to massive jank.
Recording with native memory allocation: https://perfht.ml/36mIbSc
In a single hang js::intl_FormatDateTime
and toLocaleTimeString
allocate about 30 Mb native memory.
Offending line: https://searchfox.org/mozilla-central/source/devtools/client/netmonitor/src/components/websockets/FrameListColumnTime.js#35
Solution is to re-use the same formatter instance: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/format
Assignee | ||
Updated•4 years ago
|
Summary: js::intl_FormatDateTime/toLocaleTimeString allocate massive amounts of memory → `toLocaleTimeString` allocate massive amounts of memory
Assignee | ||
Comment 1•4 years ago
|
||
Updated•4 years ago
|
Assignee: nobody → hkirschner
Assignee | ||
Comment 2•4 years ago
|
||
Before/after: https://perfht.ml/34bzvwJ
300ms per new message down to 90ms.
Tested on https://firefox-devtools-debug-ws.glitch.me/ with 500+ messages
Assignee | ||
Updated•4 years ago
|
Status: NEW → ASSIGNED
Updated•4 years ago
|
Whiteboard: [qf] → [qf:p3:responsiveness]
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9019f3ce9559 Use cached instance of DateTimeFormat for WS frames r=Honza
Comment 4•4 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Updated•2 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•