New issue
Advanced search Search tips

Issue 725390 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 561209
Owner:
Closed: May 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

serviceworker thread startup cost much time, for too many thread conversion

Reported by atua...@gmail.com, May 23 2017

Issue description

Steps to reproduce the problem:
1. visit any serviceworker page.
2. close the page, util the serviceworker thread terminate.
3. visit the page again, the serviceworker thread startup cost 100-300ms.

What is the expected behavior?
serviceworker can startup within 50ms

What went wrong?
open a serviceworker page, loading its document, it will dispatch a fetch event, and it will result in startup serviceworker thread from IO thread, but the worker thread need to be startup in UI thread(ServiceWorkerProcessManager::AllocateWorkerProcess), so it needs to post task to UI thread, if the UI thread is very busy, this conversion will cost more than 200ms.

when EmbeddedWorkerInstance::ProcessAllocated, it will call RegisterToWorkerDevToolsManager to notify ServiceWorkerCreated, and post task to IO thread to continue start serviceworker thread, it may cost 10-100ms.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.87  Channel: n/a
OS Version: All
Flash Version: Shockwave Flash 25.0 r0

thread conversion may cost much time, can we start serviceworker thread in one thread, no need any execution in UI thread?
 
Owner: shimazu@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 2 by falken@chromium.org, May 23 2017

Mergedinto: 561209
Status: Duplicate (was: Assigned)

Sign in to add a comment