Closed Bug 1151750 Opened 9 years ago Closed 9 years ago

Make it easier to find out why the AddonWatcher displays an add-on as slowing down Firefox

Categories

(Toolkit :: Performance Monitoring, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

Attachments

(2 files, 4 obsolete files)

For the moment, the only way to find out why the AddonWatcher has flagged an add-on as slow is to look at Telemetry. The self-support UX will certainly eventually provide something intended for end-users, but we need something for add-on developers.

We should add the information in about:performance.
Assignee: nobody → dteller
Attachment #8589061 - Flags: review?(dtownsend)
For reference, this is what it looks like.
Attachment #8589063 - Flags: feedback?(dtownsend)
Comment on attachment 8589061 [details] [diff] [review]
Recapitulating alerts in about:performance

Review of attachment 8589061 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/aboutperformance/content/aboutPerformance.js
@@ +122,5 @@
> +      "Alerts",
> +      "Jank level alerts",
> +      "(highest jank)",
> +      "Cross-Process alerts",
> +      "(highest CPOW)"

Not necessary for landing but seems like you could construct this from the MEASURES constant above.

@@ +153,5 @@
> +      // Display the name of the add-on
> +      let elName = document.createElement("td");
> +      elAddon.appendChild(elName);
> +      AddonManager.getAddonByID(addonId, a => {
> +        elName.textContent = a?a.name:addonId

Nit: spaces around operators

@@ +155,5 @@
> +      elAddon.appendChild(elName);
> +      AddonManager.getAddonByID(addonId, a => {
> +        elName.textContent = a?a.name:addonId
> +      });
> +      

Nit: whitespace

::: toolkit/modules/AddonWatcher.jsm
@@ +183,1 @@
>          // Report mibehaviors to the user.

Typo: misbehaviors

@@ +185,3 @@
>          let reason = null;
>  
> +        for (let k of FILTERS) {

s/k/filter/

@@ +187,5 @@
> +        for (let k of FILTERS) {
> +          let peak = stats.peaks[k] || 0;
> +          stats.peaks[k] = Math.max(diff[k], peak);
> +
> +          if (limits[k] < 0 || diff[k] <= limits[k]) {

limits[k] <= 0 please or setting the prefs to 0 won't disable checking.

@@ +193,2 @@
>            }
> +          

Nit: whitespace
Attachment #8589061 - Flags: review?(dtownsend) → review+
Attachment #8589063 - Flags: feedback?(dtownsend) → feedback+
(In reply to Dave Townsend [:mossop] from comment #3)
> @@ +187,5 @@
> > +        for (let k of FILTERS) {
> > +          let peak = stats.peaks[k] || 0;
> > +          stats.peaks[k] = Math.max(diff[k], peak);
> > +
> > +          if (limits[k] < 0 || diff[k] <= limits[k]) {
> 
> limits[k] <= 0 please or setting the prefs to 0 won't disable checking.

Well, so far, we used -1 for disabling. Do you want me to change this?
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #4)
> (In reply to Dave Townsend [:mossop] from comment #3)
> > @@ +187,5 @@
> > > +        for (let k of FILTERS) {
> > > +          let peak = stats.peaks[k] || 0;
> > > +          stats.peaks[k] = Math.max(diff[k], peak);
> > > +
> > > +          if (limits[k] < 0 || diff[k] <= limits[k]) {
> > 
> > limits[k] <= 0 please or setting the prefs to 0 won't disable checking.
> 
> Well, so far, we used -1 for disabling. Do you want me to change this?

The previous code ignored limits <= 0 and I don't see a reason to change that.
Applied final feedback.
Attachment #8590252 - Attachment is obsolete: true
So, on Try, the MacOS X 10.8 build timeouts silently during linking, for no reason that I can understand. Since I have strictly no issue locally on MacOS X and other platforms pass all tests, I'll suspect an unrelated issue (disk full?) and mark this checkin-needed.
Keywords: checkin-needed
sorry had to back this out for test failures like https://treeherder.mozilla.org/logviewer.html#?job_id=2635525&repo=fx-team
Flags: needinfo?(dteller)
Whiteboard: [fixed-in-fx-team]
Oh, wrong patch :/
Yes, as I wrote, wrong patch. My apologies.
Flags: needinfo?(dteller)
Attached file MozReview Request: bz://1151750/Yoric (obsolete) —
/r/7069 - Bug 1151750 - about:performance now recapitulates alerts;r=mossop
/r/7071 - Bug 1152759 - Regroup Performance Monitoring modules/components;r=yoric
/r/7073 - API WIP

Pull down these commits:

hg pull -r 516cbbd3805a58ffcc21feaf47c9ed66dfd29595 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8592864 - Flags: review?(dtownsend)
Comment on attachment 8592864 [details]
MozReview Request: bz://1151750/Yoric

Assuming this is all the same as the patch in bug 1154239
Attachment #8592864 - Flags: review?(dtownsend)
Keywords: checkin-needed
OS: Mac OS X → All
Hardware: x86 → All
https://hg.mozilla.org/integration/fx-team/rev/f35b2802480c
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/f35b2802480c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: