Note: There are a few cases of duplicates in user autocompletion which are being worked on.

addon-manager services are running in B2G

RESOLVED FIXED

Status

Firefox OS
General
P1
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dietrich, Assigned: fabrice)

Tracking

(Blocks: 1 bug)

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed)

Details

(Whiteboard: [MemShrink][slim:1MB])

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

5 years ago
non-zero performance and memory cost. also making network traffic daily at least, which costs the user money.
(Reporter)

Comment 1

5 years ago
requesting blocking for at least turning off network traffic, if for some reason we actually need the services running.
blocking-basecamp: --- → ?
OS: Mac OS X → Gonk
Hardware: x86 → ARM
blocking-basecamp: ? → +
Assignee: nobody → fabrice
Blocks: 797189
Whiteboard: [MemShrink]
FWIW the memory usage here is ~0.3mb, at least at startup.  (Maybe the compartments grow over time.)
(Assignee)

Comment 3

5 years ago
(In reply to Justin Lebar [:jlebar] from comment #2)
> FWIW the memory usage here is ~0.3mb, at least at startup.  (Maybe the
> compartments grow over time.)

Justin, how do you get this number? I like to reproduce to see if my fix works.
(In reply to Fabrice Desré [:fabrice] from comment #3)
> (In reply to Justin Lebar [:jlebar] from comment #2)
> > FWIW the memory usage here is ~0.3mb, at least at startup.  (Maybe the
> > compartments grow over time.)
> 
> Justin, how do you get this number? I like to reproduce to see if my fix
> works.

Update your b2g repository to latest (it's not updated by ./repo sync).  On the device, run ./get-about-memory.py.  It will pull a bunch of files.  gunzip merged-reports.gz.  In Firefox nightly on desktop, open about:memory?verbose and scroll down to the bottom of the page.  Select your file and see if the add-on manager compartment is present.
(Assignee)

Comment 5

5 years ago
http://mxr.mozilla.org/mozilla-central/source/b2g/app/b2g.js#490 already disables update pings. So I don't think there's much more we can do unless we're ok to fully remove add-on support (which is a bad idea imho).
(In reply to Fabrice Desré [:fabrice] from comment #5)
> we're ok to fully remove add-on support (which is a bad idea imho).

Why do you think it's a bad idea?  It's 100% unused code.
(Assignee)

Comment 7

5 years ago
(In reply to Chris Jones [:cjones] [:warhammer] from comment #6)
> (In reply to Fabrice Desré [:fabrice] from comment #5)
> > we're ok to fully remove add-on support (which is a bad idea imho).
> 
> Why do you think it's a bad idea?  It's 100% unused code.

For a few reasons:
- It's needed to run tests iirc and the embedded httpd.js when Gaia is in DEBUG mode.
- Some partners said at some point that they would like to ship pre-installed extensions (maybe it's not true anymore).
- I'd like us to keep that for people that want to experiment at a platform level without having to reflash.
Is that worth 300kb of memory, though?  We're so tight at the moment, I'm not convinced it is worth spending 300kb for features that we may use at some point in the future.
(In reply to Fabrice Desré [:fabrice] from comment #7)
> (In reply to Chris Jones [:cjones] [:warhammer] from comment #6)
> > (In reply to Fabrice Desré [:fabrice] from comment #5)
> > > we're ok to fully remove add-on support (which is a bad idea imho).
> > 
> > Why do you think it's a bad idea?  It's 100% unused code.
> 
> For a few reasons:
> - It's needed to run tests iirc and the embedded httpd.js when Gaia is in
> DEBUG mode.

Why is it needed to run tests?

We can enable it for alternate configs, no problem.  But hopefully not for release.

> - Some partners said at some point that they would like to ship
> pre-installed extensions (maybe it's not true anymore).

They don't need the addon manager for this, I don't believe.

> - I'd like us to keep that for people that want to experiment at a platform
> level without having to reflash.

Sure, no problem --- the question is about the shipping config.
(Assignee)

Comment 10

5 years ago
Created attachment 670208 [details] [diff] [review]
patch

With this patch, we get rid of :

addonManager.js
addonManager.jsm
LightweightThemeManager.jsm

From a couple of runs with/without, it seems that we get about 1 Mo of memory back.
(Assignee)

Comment 11

5 years ago
Created attachment 670210 [details] [diff] [review]
patch v2

I'm not sure who can review this?
Attachment #670208 - Attachment is obsolete: true
Maybe Taras for the Telemetry changes?  (He might want us to do something a bit cleaner, like ifndef according to a ENABLE_LIGHTWEIGHT_THEMES variable.)
(Assignee)

Updated

5 years ago
Attachment #670210 - Flags: feedback?(taras.mozilla)

Comment 13

5 years ago
Comment on attachment 670210 [details] [diff] [review]
patch v2

I don't know what this makefile goop does, but glandium's r+ might be sufficient here.
Attachment #670210 - Flags: feedback?(taras.mozilla) → review?(mh+mozilla)
Comment on attachment 670210 [details] [diff] [review]
patch v2

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

::: toolkit/components/telemetry/TelemetryPing.js
@@ +17,1 @@
>  Cu.import("resource://gre/modules/ctypes.jsm"); 

Please remove the trailing whitespace, while here.
Attachment #670210 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 15

5 years ago
Created attachment 670934 [details] [diff] [review]
patch v3

Sorry for the churn, but I learned that it was a bad idea to disable addons in desktop builds since it breaks developers using gaia DEBUG mode.

So this patch is using MOZ_WIDGET_GONK defines to only filter these out on device.
Attachment #670210 - Attachment is obsolete: true
Attachment #670934 - Flags: review?(mh+mozilla)
Whiteboard: [MemShrink] → [MemShrink][slim:1MB]
Comment on attachment 670934 [details] [diff] [review]
patch v3

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

::: b2g/installer/package-manifest.in
@@ +379,5 @@
>  @BINPATH@/components/GPSDGeolocationProvider.manifest
>  @BINPATH@/components/GPSDGeolocationProvider.js
>  @BINPATH@/components/nsSidebar.manifest
>  @BINPATH@/components/nsSidebar.js
>  @BINPATH@/components/extensions.manifest

I guess you're leaving extensions.manifest for nsBlocklistService? Is it any useful without the addon manager? If not, you can remove extensions.manifest and nsBlocklistService.js.
Attachment #670934 - Flags: review?(mh+mozilla) → review+
(Assignee)

Comment 17

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/53146375872f
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/53146375872f
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
https://hg.mozilla.org/releases/mozilla-aurora/rev/de000386f8bf
status-firefox18: --- → fixed
status-firefox19: --- → fixed
You need to log in before you can comment on or make changes to this bug.