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

Issue 2889393003: Lazy initialization of the rendering thread in OfflineAudioContext (Closed)

Created:
3 years, 7 months ago by hongchan
Modified:
3 years, 7 months ago
Reviewers:
Raymond Toy
CC:
Raymond Toy, blink-reviews, chromium-reviews, haraken, hongchan
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Lazy initialization of the rendering thread in OfflineAudioContext This CL changes the timing of thread initialization in OfflineAudioDestinationNode after starting the actual rendering. This prevents out-of-threads situation from happening particularly when user creates thousands of OfflineAudioContexts upfront. BUG=723838, 716800 TEST=LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html Review-Url: https://codereview.chromium.org/2889393003 Cr-Commit-Position: refs/heads/master@{#474494} Committed: https://chromium.googlesource.com/chromium/src/+/6d697f84c040b2cf41e6d1f90a7b123c496bd836

Patch Set 1 #

Total comments: 3

Patch Set 2 : Change thread creation location and add layout test #

Total comments: 8

Patch Set 3 : Address feedback #

Total comments: 2

Patch Set 4 : Rewrite layout test #

Total comments: 7

Patch Set 5 : Fixing typo in comment #

Patch Set 6 : Splitting a test task into two #

Patch Set 7 : Adjusting number of contexts for timed-out trybots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -8 lines) Patch
A third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html View 1 2 3 4 5 6 1 chunk +76 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp View 1 2 3 chunks +8 lines, -5 lines 0 comments Download

Messages

Total messages: 29 (14 generated)
hongchan
PTAL. https://codereview.chromium.org/2889393003/diff/1/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp (left): https://codereview.chromium.org/2889393003/diff/1/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp#oldcode239 third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp:239: The existence of thread and being able to ...
3 years, 7 months ago (2017-05-19 17:35:07 UTC) #3
Raymond Toy
Can we also add a layout test where we create 1000 (or something) contexts successfully ...
3 years, 7 months ago (2017-05-19 19:37:54 UTC) #4
hongchan
3 years, 7 months ago (2017-05-23 16:49:46 UTC) #7
Raymond Toy
Please update TEST= in description. Will you handle stopping the render thread in a different ...
3 years, 7 months ago (2017-05-23 17:05:01 UTC) #8
hongchan
https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html (right): https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html#newcode13 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html:13: const audit = Audit.createTaskRunner(); On 2017/05/23 17:05:01, Raymond Toy ...
3 years, 7 months ago (2017-05-23 18:10:38 UTC) #11
Raymond Toy
https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html (right): https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html#newcode22 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html:22: // Create 2500 contexts in total, 1 context per ...
3 years, 7 months ago (2017-05-23 18:13:28 UTC) #12
Raymond Toy
https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp File third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp (left): https://codereview.chromium.org/2889393003/diff/40001/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp#oldcode234 third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp:234: if (!DestinationHandler().OfflineRenderThread()) { On 2017/05/23 18:10:38, hongchan wrote: > ...
3 years, 7 months ago (2017-05-23 18:14:41 UTC) #13
Raymond Toy
https://codereview.chromium.org/2889393003/diff/80001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html (right): https://codereview.chromium.org/2889393003/diff/80001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html#newcode42 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html:42: should(i, 'The number of created contexts without a crash') ...
3 years, 7 months ago (2017-05-23 18:38:27 UTC) #14
hongchan
https://codereview.chromium.org/2889393003/diff/80001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html (right): https://codereview.chromium.org/2889393003/diff/80001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html#newcode42 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html:42: should(i, 'The number of created contexts without a crash') ...
3 years, 7 months ago (2017-05-23 20:30:20 UTC) #16
Raymond Toy
https://codereview.chromium.org/2889393003/diff/120001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html (right): https://codereview.chromium.org/2889393003/diff/120001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html#newcode23 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html:23: const maxNumberOfContexts = 2500; On 2017/05/23 20:30:19, hongchan wrote: ...
3 years, 7 months ago (2017-05-23 20:37:34 UTC) #17
Raymond Toy
lgtm, but I still think the creation and the rendering should be two Audit tasks. ...
3 years, 7 months ago (2017-05-23 20:52:47 UTC) #18
hongchan
https://codereview.chromium.org/2889393003/diff/120001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html File third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html (right): https://codereview.chromium.org/2889393003/diff/120001/third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html#newcode23 third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-smoke-test.html:23: const maxNumberOfContexts = 2500; On 2017/05/23 20:37:34, Raymond Toy ...
3 years, 7 months ago (2017-05-23 20:55:46 UTC) #19
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/2889393003/160001
3 years, 7 months ago (2017-05-23 21:21:35 UTC) #22
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/2889393003/180001
3 years, 7 months ago (2017-05-24 19:46:57 UTC) #26
commit-bot: I haz the power
3 years, 7 months ago (2017-05-25 00:40:13 UTC) #29
Message was sent while issue was closed.
Committed patchset #7 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/6d697f84c040b2cf41e6d1f90a7b...

Powered by Google App Engine
This is Rietveld 408576698