Open Bug 1406314 Opened 7 years ago Updated 2 years ago

Netmonitor request/response data are copied 3 times

Categories

(DevTools :: Netmonitor, enhancement, P2)

enhancement

Tracking

(firefox57 fix-optional)

Tracking Status
firefox57 --- fix-optional

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Network monitor on the backend side instanciate listeners in the parent process.
That's because network connections can only be observed from the parent process.
But the actors live in the web page process, i.e. the content process.
So what happens is that the listeners fetch a first copy of all requests/responses data (headers, cookies, body, ...).
It then forwards this to the content process, to the webconsole actor, via the message manager. This ends up creating copies of everything in the content process.
And finally, the actor sends these data to the client/frontend and ends up instanciating the last and third copy of everything in the parent process.

This isn't a bid deal for various metadata like URL, mimeType, sizes, timings, ...
But it starts to be one for response body, POST Data and may be also for headers and cookies. It slow things down and consume memory for bad reasons.

With the current setup, where the frontend and the network listeners both live in the same process, it looks very unefficient. But we have to be careful to support remote debugging, where copies are still going to be necessary.
Comment on attachment 8915872 [details]
Bug 1406314 - Prevent multiple response content copies in parent and in content processes.

Here is a terrible hack to have only one copy of response content when debugging locally.

Note that this issue sounds very bad in the current state of netmonitor, which pull everything, always. But this will be mitigated by bug 1404913. So that we will do such copies only on some user actions, like opening the response/headers panels.
Component: Developer Tools: Framework → Developer Tools: Netmonitor
Priority: -- → P2
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: