Closed Bug 1320703 Opened 8 years ago Closed 7 years ago

Lazy load developer-toolbar from inspector frontend

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

I recently looked at profiler output while we are opening a toolbox, and there is many valuable info in there.
Loading modules is one of the most consuming action.
We recently droped all lazy load from inspector client (bug 1292184),
this is really wrong as that forces loading everything at once during toolbox startup. Keep in mind that module loading happens in the parent process and is most likely a synchronous process. So loading a lot of modules at once propably hangs the UI while it also delay UI setup as it is a pretty slow operation.

A recent experience highlighted the cost of modules:
https://blog.mozilla.org/nnethercote/2016/11/03/faster-firefox-startup-shutdown-with-add-ons-present/

Here is the list of dependencies loaded by the inspector, sorted from slowest to fastest to load:
  computed.js
    tooltip-overlays.js
      SwatchFilterTooltip.js
        FilterWidget.js
      CssDocsTooltip.js
      SwatchCubicBezierTooltip.js
      SwatchColorPickerTooltip.js
      ImageTooltipHelper.js
    output-parser.js
    box-model.js
    highlighter-overlays.js
  developer-toolbar.js
  markup.js
    html-editor.js
    undo.js
  inspector-search.js
  css-properties.js

I totally agree that we should replace useless lazy load by direct loads,
but there is some obvious lazy load that have a lot of value.
Here, developer-toolbar, that is only to be loaded when we try to do a screenshot. It pulls many deps from gcli that takes a serious amount of CPU and memory to load. CPU that isn't used to load other important stuff necessary to setup the UI!
Blocks: 1320786
Priority: -- → P2
Looks like developer-toolbar.js module is no longer a perf issue with bug 1320149 landed.
https://clptr.io/2jpM4lz
  It is only reported to be 3ms load, and doesn't imply other dependencies that isn't already loaded.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: