Don't load onboarding frame script into every frameloader

RESOLVED FIXED in Firefox 61

Status

()

enhancement
P1
normal
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: kmag, Assigned: kmag)

Tracking

unspecified
Firefox 61
Points:
---

Firefox Tracking Flags

(firefox61 fixed)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(1 attachment)

(Assignee)

Description

a year ago
We currently wind up wasting a huge amount of memory by loading the onboarding.js framescript into every frameloader of every content process, even though we only actually need it when we're loading about:home or about:newtab.
Comment hidden (mozreview-request)

Comment 2

a year ago
(In reply to Kris Maglione [:kmag] (long backlog; ping on IRC if you're blocked) from comment #0)
> We currently wind up wasting a huge amount of memory by loading the
> onboarding.js framescript into every frameloader of every content process,

Out of curiosity, how did you establish this (and how much is a "huge amount")? I recently tried to use about:memory to figure out which (if any) frame scripts were using a lot of memory, and couldn't see any way of getting that information, but I'm presumably missing something.
Flags: needinfo?(kmaglione+bmo)
(Assignee)

Comment 3

a year ago
(In reply to :Gijs from comment #2)
> Out of curiosity, how did you establish this (and how much is a "huge
> amount")?

Not easily. We currently have somewhere over 1MB of string data in every empty content process, according to about:memory. Most of that is "non-notable" strings, so I lowered the threshold for notable strings to figure out what most of it was, and then tracked those strings down to scripts.

It's hard to say exactly how much this change saves, but it seems to be somewhere on the order of 10s of KB to 100KB per frame script. I stopped looking in detail once it was clear that this made a measurable difference.
Flags: needinfo?(kmaglione+bmo)

Updated

a year ago
Attachment #8953564 - Flags: review?(dtownsend) → review?(gijskruitbosch+bugs)

Comment 4

a year ago
mozreview-review
Comment on attachment 8953564 [details]
Bug 1440747: Don't load onboarding frame script into every frameloader.

https://reviewboard.mozilla.org/r/222782/#review229590

Stealing because I looked at this already. r=me
Attachment #8953564 - Flags: review?(gijskruitbosch+bugs) → review+
(Assignee)

Comment 5

a year ago
(In reply to :Gijs from comment #4)
> Stealing because I looked at this already. r=me

Thanks
(In reply to Kris Maglione [:kmag] (long backlog; ping on IRC if you're blocked) from comment #5)
> (In reply to :Gijs from comment #4)
> > Stealing because I looked at this already. r=me
> 
> Thanks

Do you plan on landing this?
Flags: needinfo?(kmaglione+bmo)
Whiteboard: [MemShrink] → [MemShrink:P2]
(Assignee)

Comment 7

a year ago
Yeah, sorry, conflicts landed almost as soon as I wrote this, and I got side-tracked before I had a chance to resolve them
Flags: needinfo?(kmaglione+bmo)
(Assignee)

Comment 8

a year ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fbe9eda393abf440bf773ff6512a17fa6daad23
Bug 1440747: Don't load onboarding frame script into every frameloader. r=Gijs

Comment 9

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8fbe9eda393a
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
You need to log in before you can comment on or make changes to this bug.