Closed Bug 1406778 Opened 7 years ago Closed 7 years ago

Lazily load the font inspector

Categories

(DevTools :: Inspector, enhancement, P3)

enhancement

Tracking

(firefox57 fix-optional, firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox57 --- fix-optional
firefox58 --- fixed

People

(Reporter: gl, Assigned: gl)

Details

Attachments

(1 file)

      No description provided.
Alex, you will noticed that I removed the pref check for the font inspector enabled. I don't think we are ever gonna try and disable this again, so I am removing that pref check. I think there might be some extra work where we can also remove the check for the canGetUsedFontFaces, but I am gonna save that for another bug.
Comment on attachment 8917962 [details]
Bug 1406778 - Lazily load the font inspector.

https://reviewboard.mozilla.org/r/188858/#review194186

Thanks, I completely forgot about that one...

You should also remove the pref from:
http://searchfox.org/mozilla-central/source/devtools/client/preferences/devtools.js
http://searchfox.org/mozilla-central/source/devtools/client/inspector/fonts/test/head.js
http://searchfox.org/mozilla-central/source/devtools/client/inspector/inspector.js#624

::: devtools/client/inspector/inspector.js:674
(Diff revision 1)
>      }
>  
> -    if (Services.prefs.getBoolPref("devtools.fontinspector.enabled") &&
> -        this.canGetUsedFontFaces) {
> -      const FontInspector = this.browserRequire("devtools/client/inspector/fonts/fonts");
> +    if (this.canGetUsedFontFaces) {
> +      let fontId = "fontinspector";
> +      let fontTitle = INSPECTOR_L10N.getStr("inspector.sidebar.fontInspectorTitle");
> +      this.sidebar.addTab(

May be you could copy paste comment from line 640 to help understanding this non obvious lazy loading setup.
Attachment #8917962 - Flags: review?(poirot.alex) → review+
Oh BTW, could you push this change to talos before pushing, to see if that reports any win?
  ./mach try -b do -p linux64 -u none -t g2-e10s --rebuild-talos 6
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/bb6f23916cb1
Lazily load the font inspector. r=ochameau
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/193014cd4fd4
Lazily load the font inspector. r=ochameau
https://hg.mozilla.org/mozilla-central/rev/193014cd4fd4
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
(In reply to Gabriel [:gl] (ΦωΦ) from comment #5)
> Talos
> https://treeherder.mozilla.org/perf.html#/
> comparechooser?newProject=try&newRevision=39c1b994815b1557627e7a8a85836f7c07b
> 873ae

DAMP reported a win with medium confidence on inspector.open as the win was around the variance of these tests.
Variance is typically around 1-3% and the win here seems to be around 2-3%.

The long term graph confirmed a ~3% win on complicated inspector open:
https://treeherder.mozilla.org/perf.html#/graphs?series=mozilla-central,1418016,1,1
Product: Firefox → DevTools
Component: Inspector: Fonts → Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: