MBT Console performance issue: 50s to open, 1.8 GB consumed (with profile) - too much time spent in Map construction and Array.from
Categories
(DevTools :: General, defect, P3)
Tracking
(Fission Milestone:Future)
Fission Milestone | Future |
People
(Reporter: jdescottes, Unassigned)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
On a recently restarted Nightly (my usual profile, but I don't use many addons) with ~30 tabs opened, MBT took almost a minute to open, consuming a lot of memory.
Profile
https://share.firefox.dev/31xm5vT
It seems that most of the time is spent in the console dealing with incoming messages. The 10000 message limit is quickly reached (at least according to the markers) but the console frontend still struggled to process the messages.
Note that content messages were disabled.
Reporter | ||
Comment 1•4 years ago
|
||
Clearing the console significantly improved the issue. I guess there must have been a lot of cached messages, overwhelming the UI.
Reporter | ||
Updated•4 years ago
|
Comment 2•4 years ago
|
||
The profile from Comment 0 shows a high percent of the time is spent in Map constructor and Array.from
This is probably due to the fact that console messages are stored in Map , and operations that we do in message reducers (cloning, re-ordering within the Map, searching) are taking way to long.
A potential solution is to use a simple object to store the messages, as the key of the Map is a simple string.
Since we need to know the order of messages, and given that objects can't guarantee that, we might add another array in the store that would store all the messages ids (same as we already do for storing visible messages).
Updated•3 years ago
|
Updated•3 years ago
|
Comment 3•2 years ago
|
||
Bug 1432343 probably helped reduce the time spent in Map constructor
Not sure if we should keep this bug open since we also have Bug 1685081 and Bug 1764501
Comment 4•2 years ago
|
||
Marking as dupe of Bug 1764501
Description
•