Defer initial processing by Privileged Content process at startup
Categories
(Firefox :: New Tab Page, defect, P3)
Tracking
()
Performance Impact | medium |
People
(Reporter: jesup, Unassigned)
References
Details
(Keywords: perf:resource-use)
The Privileged Content process does a lot of CPU use right after browser start; we should consider deferring it until the browser has been idle for a while.
See https://perfht.ml/2I2LrIf (Process 16834); it was highly busy for 1 second at start, then occasionally busy after that. See https://perfht.ml/2HOkacm
Reporter | ||
Comment 1•6 years ago
|
||
In another context (different bug), it was mentioned that if a thumbnail fails to render before shutdown it apparently will start rendering again on startup. Any such rendering should be deferred until an idle period after startup.
Also: startup-time CPU use has a disproportionate impact on GeckoView, since browser (re)starts are far more common.
Comment 2•6 years ago
•
|
||
Could you clarify what you're talking about here? We were confused in triage because you mentioned thumbnail rendering and new-tab, and GeckoView, but the GeckoView (Fenix) new-tab page doesn't show thumbnails, as far as I know.
(We're also not sure what exactly the Privileged Content Process does, particularly in GeckoView, and which of its tasks are deferrable vs. important-to-do-ASAP)
Reporter | ||
Comment 3•6 years ago
|
||
Right, this might not apply to GeckoView currently... though if geckoview ever extends beyond android it's unclear if this would apply (probably not; any privileged content process might be a separate geckoview instance I'd guess).
Updated•6 years ago
|
Comment 4•6 years ago
|
||
The priority flag is not set for this bug.
:tspurway, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Ed, can you do some quick debugging and advise on LOE and Priority to get this fixed? Thanks!
Comment 6•6 years ago
|
||
A quick sanity check, does setting browser.pagethumbnails.capturing_disabled
to true
make things any better? Additionally, I see no javascript stacks from the profiles in comment 0, so perhaps those weren't captured? Would help tracking down from activity-stream / thumbnail side as all the code is js.
Reporter | ||
Comment 7•6 years ago
|
||
(In reply to Ed Lee :Mardak from comment #6)
A quick sanity check, does setting
browser.pagethumbnails.capturing_disabled
totrue
make things any better? Additionally, I see no javascript stacks from the profiles in comment 0, so perhaps those weren't captured? Would help tracking down from activity-stream / thumbnail side as all the code is js.
simpleperf can't record JS stacks (it's basically 'perf' and we can't use the --enable-perf build option to get (bad) JS stacks without some work..)
Comment 8•6 years ago
|
||
jesup, are you noticing this even when about:home/newtab are not open at startup? The privileged content process should only be used by those pages and with bug 1353013, I believe the preloaded about:newtab does get deferred.
Looking at the profiles from comment 0, they look like regular new tab rendering the page on first data hydration of sites and content to display.
Comment 9•6 years ago
|
||
Moving this to P3 (backlog) until we have information to translate this into actionable work. Please keep us posted :jesup & :Mardak. Thanks!
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 10•5 years ago
|
||
Andrew - next time you look at a simpleperf startup profile, can you check the status of this? Thanks
Comment 11•5 years ago
|
||
I've captured simpleperf startup profiles from a recent Fenix build. (Release build variant, but with android debuggable=true so that I can simpleperf).
But I'm not seeing the Privileged Content process.
https://share.firefox.dev/34dLI7D
Another one, this one captured the content process:
https://share.firefox.dev/32482hm
The startup method is applink via adb intent.
Reporter | ||
Comment 12•5 years ago
|
||
I don't think privileged content exists in Geckoview: "Right, this might not apply to GeckoView currently.." above... This is a general bug.
Also, while I said "simpleperf" (not sure why), these problems were all seen with 'perf' profiles on desktop (linux)
Updated•3 years ago
|
Updated•3 years ago
|
Comment 13•5 days ago
|
||
Recent profile from a local Mac build: https://share.firefox.dev/41igXLC
Yes there is CPU activity in the privileged content process during startup, but overall I'd say we have bigger CPU time issues in the parent process these days.
The profile shows two very similar chunks of activity in the privileged content process. I think the first chunk is for rendering the new tab page that's shown in the foreground tab, and the second chunk is for preparing another new tab page in the background.
Here's a profile with many repeats: https://share.firefox.dev/4fPcrdF
We triaged this bug in a triage meeting and agreed that this continues to stay medium impact.
Description
•