New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 719100 link

Starred by 7 users

Issue metadata

Status: Started
Merged: issue 538751
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

ServiceWorker startup does unnecessary initialization work for Shadow Page (e.g. parsing CSS)

Project Member Reported by vdje...@fb.com, May 5 2017

Issue description

When Chrome creates a new (render) process for a service worker, the new process's CrRenderMain thread performs a bunch of initialization work that's not needed for a ServiceWorker:

1) Setting up SafeBrowsing's anti-phishing
1) Parsing a stylesheet (presumably default browser stylesheet) and applying the style 
2) Layout work(!)

This seems like an unnecessary overhead that delays ServiceWorker startup. Is it possible to skip this work or postpone doing it?

See attached chrome://tracing output, I can upload the trace itself but it's very reproducible
 
Screen Shot 2017-05-05 at 4.20.27 PM.png
128 KB View Download

Comment 1 by vdje...@fb.com, May 6 2017

Cc: kenjibaheux@chromium.org
Owner: kinuko@chromium.org
Could this be due to the shadow document architecture that we currently have?
Any reasonable short term option or shall this be solved as part of the existing plan?
Components: Blink>ServiceWorker
Yep, I did see that this could happen when the shadow document is loaded. We're removing this part so I expect this should be solved.  (I'll also look if there's an easier shorter-term option)
Labels: -Pri-3 Pri-2
Status: Assigned (was: Untriaged)
Thanks for confirming.
Assigning to you in the meantime.

I see two potential outcomes:
 1. there is a reasonable short term option in which case we keep this bug open, describe the plan, and find an owner.
 2. there is no reasonable short term option in which case we dedup against the bug tracking the removal of the shadow document.

Best,

Comment 7 by kinuko@chromium.org, Sep 29 2017

Mergedinto: 538751
Status: Duplicate (was: Assigned)
Let me merge this to the other issue that tries to remove the shadow document.
Status: Available (was: Duplicate)
Let me revive this given that fixing these smaller ones could potentially be important as far as it's not hard to do (while we also want to make progress on shadow document removal)
Cc: nhiroki@chromium.org
Owner: ----
Summary: ServiceWorker startup does unnecessary initialization work for Shadow Page (e.g. parsing CSS) (was: ServiceWorker startup does unnecessary initialization work (e.g. parsing CSS))
Cc: falken@chromium.org
Hiroki, Matt: do we think we could do some of these in Q2?
Owner: nhiroki@chromium.org
Status: Started (was: Available)
I'm now making a POC CL to bypass some ShadowPage setup.

Sign in to add a comment