Open Bug 1606740 Opened 5 years ago Updated 2 years ago

Console is slowed down by Network requests

Categories

(DevTools :: Netmonitor, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: Harald, Unassigned)

References

(Blocks 2 open bugs)

Details

STR: Open Console on https://firefox-devtools-log-a-lot.glitch.me/ and hit netNoop (make sure XHR and Requests are off).

Multi-second UI hang with no visible additions to Console.

https://perfht.ml/2tlbuGT

Bug 1599604 is part of it, but messages() from resource://devtools/client/webconsole/reducers/messages.js shows up 2nd due to expensive CopyDataPropertiesUnfiltered.

First attempt of switching networkMessagesUpdateById from Object to Map, like Console messages are stored:

Before: https://perfht.ml/2QjTWUE

After: https://perfht.ml/2SJpvJ3

No dice, js::MapObject::construct is taking over (like bug 1599604).

What makes this worse is that this overhead happens also when Console is in background and just gathering data.

Priority: P3 → P2

Via Florian in bug 1620235.

I tried to profile something that I needed to start from the browser console, and I was surprised to see in my profile a significant amount of network-monitor code: https://perfht.ml/2xda7Mi

Via Nicholas in Slack:

CSS Warnings, only start to watch once you toggle the XHR/Network filters, but that means we'd miss network requests that were done before enabling the filter

I agree. The downside of slowing down everybody using DevTools, in case they ever want to see previous Network requests is not worth the drag and also potentially impacts closing time (bug 1471158).

Depends on: 1643797
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.