Closed Bug 1396783 Opened 2 years ago Closed 2 years ago

devtools/client/inspector/inspector.js loads too many dependencies

Categories

(DevTools :: Inspector, defect)

defect
Not set

Tracking

(firefox57 fixed)

RESOLVED FIXED
Firefox 57
Tracking Status
firefox57 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

It takes 55ms/15% of JS computing in the parent process.

With the upcoming patch it drops down to 4.4ms/1.6%.

Profile without the patch:
  https://perfht.ml/2iYWNDJ

Profile with the patch:
  https://perfht.ml/2eB0Z7w

Again, as for bug 1396619, various deps are loaded later, so the win isn't necessary the pure difference that I highlight here.

http://searchfox.org/mozilla-central/source/devtools/client/inspector/inspector.js#15-41
Most of this can be lazy loaded and especially the one that aren't used in Inspector constructor, nor init method. There is even value in lazy loading deps only used in deferredOpen.

It allows calling Inspector.init sooner and so run necessary action like initCssProperties in the content process sooner/in parallel.
Assignee: nobody → poirot.alex
Attachment #8904496 - Flags: review?(pbrosset)
Comment on attachment 8904496 [details]
Bug 1396783 - Lazy load inspector.js dependencies.

https://reviewboard.mozilla.org/r/176352/#review182242
Attachment #8904496 - Flags: review?(pbrosset) → review+
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c75e29bdb1b
Lazy load inspector.js dependencies. r=pbro
https://hg.mozilla.org/mozilla-central/rev/4c75e29bdb1b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.