Reduce time spent in resources/console-messages onConsoleAPICall
Categories
(DevTools :: Console, task)
Tracking
(firefox99 fixed)
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
(Whiteboard: dt-console-perf-2022)
Attachments
(1 file)
In this profile: https://share.firefox.dev/3IfaCVP
logging 10000 objects, there's a lot of time spent in onConsoleAPICall
There's the direct cost of prepareConsoleMessageForRemote
, which takes a message and turn it into an object, but also the cost of sending the resource through JSWindowActor to the parent process (that cost is also visible in parent process where we receive the packets).
JSWindowActor
seems to use structuredClone
on the packet, so reducing the amount of data we send might speed up things.
It would be nice to do a review of the different properties to see if they are useful
We can also probably not include some properties that don't make sense when they're null/false (e.g. groupId
, counter
, ...)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Don't clone the whole message we receive as a result of a console API call, but select
properties that are being used on the client.
As a result, we're not sending some properties anymore (functionName
, addonId
, workerType
),
and we also don't include some properties when they are falsy and wouldn't bring
any benefit (counter
,timer
, private
, prefix
, stacktrace
)
Hopefully this helps save some cycle since we're not cloning an object, but also in the
JSActor communication since the packet we need to send is smaller.
Depends on D139570
Comment 3•3 years ago
|
||
bugherder |
Description
•