Make getLastMessageId not use Array.from
Categories
(DevTools :: Console, defect, P2)
Tracking
(firefox75 fixed)
Tracking | Status | |
---|---|---|
firefox75 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
With many messages to handle, getting the last message id as we do (turning a map into an array and getting the last element) takes a very long time and consumes a lot of memory:
Comment 1•4 years ago
|
||
Assuming I understood correctly that the last message id is the id of the last message, could we just store that last message id at the time we add the message?
Assignee | ||
Comment 2•4 years ago
|
||
Logging a thousand messages instead of 10.
Assignee | ||
Comment 3•4 years ago
|
||
The id was retrieved by transforming the map into an array
and getting the last element of it. This was slow and
allocatiing a lot of memory when the messages Map contained
a lot of elements.
This patch make it so we're now storing the last message
id directly in the state so we can get it in a cheaper way.
Depends on D62184
Comment 4•4 years ago
|
||
Comment on attachment 9125387 [details]
Bug 1612571 - Increase number of logged messages in DAMP bulklog test. r=jdescottes.
Revision D62184 was moved to bug 1614366. Setting attachment 9125387 [details] to obsolete.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f62d325fc393 Store the last message id instead of computing it from the message map. r=jlast.
Comment 6•4 years ago
|
||
bugherder |
Description
•