Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 2857583003: Worker: Avoid sending IPC messages for features already counted (Closed)

Created:
3 years, 7 months ago by nhiroki
Modified:
3 years, 7 months ago
Reviewers:
kinuko
CC:
chromium-reviews, shimazu+worker_chromium.org, kinuko+worker_chromium.org, blink-reviews, horo+watch_chromium.org, falken+watch_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Worker: Avoid sending IPC messages for features already counted When a feature listed on UseCounter::Feature is used on Shared/ServiceWorkerGlobalScope, it's reported to connecting/controlling documents via the browser process and counted in their UseCounters. These IPC messages should be sent only one time per feature, but unfortunately "worker->browser" IPC is sent every time a feature is used. This is not efficient. This CL memorizes feature use in worker-side and avoids sending duplicate IPC messages to the browser process. <Example of the calling sequence> (Some feature is used on ServiceWorkerGlobalScope) UseCounter::CountFeature - WorkerOrWorkletGlobalScope::CountFeature (memorizes feature use and returns early if it's already reported) - WorkerGlobalScope::ReportFeature - ServiceWorkerGlobalScopeProxy::CountFeature - ServiceWorkerContextClient (sends an IPC message to the browser) BUG=714551 Review-Url: https://codereview.chromium.org/2857583003 Cr-Commit-Position: refs/heads/master@{#469965} Committed: https://chromium.googlesource.com/chromium/src/+/c7acabe9f43065280edf2dee91ae53f6472dcf02

Patch Set 1 #

Patch Set 2 : wip #

Unified diffs Side-by-side diffs Delta from patch set Stats (+183 lines, -37 lines) Patch
M third_party/WebKit/Source/core/workers/DedicatedWorkerTest.cpp View 1 5 chunks +52 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerObjectProxy.h View 1 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/MainThreadWorkletGlobalScope.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/MainThreadWorkletTest.cpp View 1 3 chunks +41 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletGlobalScope.cpp View 1 1 chunk +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletMessagingProxy.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/ThreadedWorkletTest.cpp View 1 7 chunks +51 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp View 1 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.h View 1 1 chunk +7 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp View 1 1 chunk +16 lines, -7 lines 0 comments Download

Messages

Total messages: 18 (14 generated)
nhiroki
ptal, thanks!
3 years, 7 months ago (2017-05-08 09:45:00 UTC) #9
kinuko
lgtm
3 years, 7 months ago (2017-05-08 09:51:45 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2857583003/20001
3 years, 7 months ago (2017-05-08 10:14:50 UTC) #15
commit-bot: I haz the power
3 years, 7 months ago (2017-05-08 12:13:30 UTC) #18
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/c7acabe9f43065280edf2dee91ae...

Powered by Google App Engine
This is Rietveld 408576698