Open Bug 1944334 Opened 9 days ago Updated 2 days ago

Opening the browser toolbox freezes Firefox when a lot of tabs are present (~6000)

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

People

(Reporter: julienw, Unassigned)

References

Details

STR:

  1. Have 6k tabs
  2. Open the devtools browser toolbox (you need to enable it first).

Here is a profile: https://share.firefox.dev/4hthhN2

It looks like the biggest offender is the repetitive call to getAllStyleSheets in [1]. Is it possible that this is returning incrementally more items, and as a result this function getStyleSheetIndex's performance doesn't grow linearly but quadratically?

[1] https://searchfox.org/mozilla-central/source/devtools/server/actors/utils/stylesheets-manager.js#371

Summary: Opening the toolbox freezes Firefox when a lot of tabs are present (~6000) → Opening the browser toolbox freezes Firefox when a lot of tabs are present (~6000)

InspectorUtils.getAllStyleSheets(document, true) in the toolbox shows repeatedly the 2 CSS files that are in the shadow dom for the tab (I don't recall the exact names at the moment).

Nicolas will take a look

Severity: -- → S3
Flags: needinfo?(nchevobbe)
Priority: -- → P2
Depends on: 1945747
Flags: needinfo?(nchevobbe)
You need to log in before you can comment on or make changes to this bug.