Closed Bug 1186379 Opened 9 years ago Closed 9 years ago

Firefox reports every Jetpack add-on as "making Nightly run slowly"

Categories

(Toolkit :: Performance Monitoring, defect)

41 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1191342

People

(Reporter: marco, Unassigned)

References

Details

Attachments

(2 files)

Very lightweight addons (such as https://github.com/mykmelez/tcpsocketpup/) are reported as slowing down the browser.

Also addons that I never use during a browsing session are reported as being slow (for example, "Firefox OS 2.0 Simulator", "Valence").
What does about:performance tell you about why the add-ons are reported?
Flags: needinfo?(mar.castelluccio)
Flags: needinfo?(mar.castelluccio)
According to about:performance, Firefox OS 2.0 simulator has been activated during the session, and not just during startup. I'm not sure why, though. I'm waiting until bug 1157009 has been reviewed and landed, this will make things easier to understand.

We have a few sources of false alerts (see bug 1166889), but so far, I haven't had any reason to believe that add-ons that are never activated show up in the list by error.

Apparently, the Gecko Profiler was loaded. Did it tell you anything interesting?
Blocks: 1185926
Flags: needinfo?(mar.castelluccio)
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #3)
> According to about:performance, Firefox OS 2.0 simulator has been activated
> during the session, and not just during startup. I'm not sure why, though.
> I'm waiting until bug 1157009 has been reviewed and landed, this will make
> things easier to understand.

I'm pretty sure I've never used it during this session (actually it's been a few
days since I last started it). Maybe it's doing something anyway even if it isn't
started?
It's weird that "API Enabler" is reported as well, since it doesn't really do
much: https://github.com/mykmelez/tcpsocketpup/blob/master/index.js#L81

> Apparently, the Gecko Profiler was loaded. Did it tell you anything
> interesting?

It wasn't running.
It is reported as well, even if I'm not profiling.
Flags: needinfo?(mar.castelluccio)
Mmmh...
Given that the numbers for all add-ons seem related, perhaps the AddonManager (or FHR?) is calling the addon-registered callback for some obscure reason?
Could you check in the Gecko Profiler if, by any chance, there is AddonManager activity? Or FHR activity?
Flags: needinfo?(mar.castelluccio)
Attached file iI_IG8OI.7z
The only AddonManager activity I see is related to the slow addon notification.
I can't see any FHR activity.

I'm attaching the profile.
Flags: needinfo?(mar.castelluccio)
As a side-note, about:telemetry => Keyed Histograms => MISBEHAVING_ADDONS_* recapitulates the measures that lead to performance alerts.
I don't see any activity of your add-ons in the profile, either.
Just to be sure: you filed this with a Nightly 41. Do you have the same behavior with 42?
On 42 the simulator is no longer reported.
The Gecko profiler and API enabler are still reported (nearly a report every 60 seconds), with the same number of "Alerts" and "Jank level alerts".
Forget it, I'm seeing the simulator reported again (still never used).
I expect that bug 1181175 will improve accuracy.

Also, can you confirm that you are running on Linux? Which kernel do you have?
Can you confirm that all the add-ons that are displayed as slow are jetpack-based?
Flags: needinfo?(mar.castelluccio)
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #12)
> I expect that bug 1181175 will improve accuracy.
> 
> Also, can you confirm that you are running on Linux? Which kernel do you
> have?

Yes, I'm using Fedora 22, kernel 4.1.3.

(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #13)
> Can you confirm that all the add-ons that are displayed as slow are
> jetpack-based?

I'm not sure about Valence.
tcpsocketpup and the simulators use the SDK (CCing Myk for confirmation).
The Gecko Profiler uses the SDK.
Flags: needinfo?(mar.castelluccio)
(In reply to Marco Castelluccio [:marco] from comment #15)
> (In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment
> #13)
> > Can you confirm that all the add-ons that are displayed as slow are
> > jetpack-based?
> 
> I'm not sure about Valence.
> tcpsocketpup and the simulators use the SDK (CCing Myk for confirmation).

tcpsocketpup does for sure.  NI jryans to confirm that the simulators use it.
Flags: needinfo?(jryans)
Summary: Firefox reports every add-on as "making Nightly run slowly" → Firefox reports every Jetpack add-on as "making Nightly run slowly"
(In reply to Myk Melez [:myk] [@mykmelez] from comment #16)
> (In reply to Marco Castelluccio [:marco] from comment #15)
> > (In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment
> > #13)
> > > Can you confirm that all the add-ons that are displayed as slow are
> > > jetpack-based?
> > 
> > I'm not sure about Valence.
> > tcpsocketpup and the simulators use the SDK (CCing Myk for confirmation).
> 
> tcpsocketpup does for sure.  NI jryans to confirm that the simulators use it.

I am not sure what form of "using" the SDK is relevant here, so I will try to be as precise as possible.

The simulators use a custom bootstrap.js[1] (not created by SDK or JPM packaging tools), which then invokes the SDK CommonJS loader machinery, similar to most SDK based add-ons.

Valence uses the standard JPM bootstrap.js[2], which effectively delegates its work to a Firefox-controlled bootstrap.js[3].  That file then also invokes the standard SDK loader machinery as well.

[1]: https://dxr.allizom.org/mozilla-central/source/b2g/simulator/bootstrap.js
[2]: https://github.com/mozilla/valence/blob/master/template/bootstrap.js
[3]: https://dxr.allizom.org/mozilla-central/source/addon-sdk/source/lib/sdk/addon/bootstrap.js
Flags: needinfo?(jryans)
Component: Untriaged → General
Component: General → Performance Monitoring
Product: Firefox → Toolkit
This seems to be the same as bug 1191342, which itself seems to be a problem in Jetpack itself.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: