Optimize BaseAudioContext::ScheduleMainThreadCleanup |
||
Issue descriptionAccording the profiling documentation [1], this method has been WebAudio's performance bottleneck. Investigate and optimize it. [1]: https://docs.google.com/document/d/1I1bRiwpFdW_DvmlivgbzinECKQ4RBEAIuyEybSN7kxs/edit?usp=sharing
,
Feb 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ce864914c1d10e96ac62a9ec99158ac48de5d07a commit ce864914c1d10e96ac62a9ec99158ac48de5d07a Author: Hongchan Choi <hongchan@chromium.org> Date: Fri Feb 09 22:03:24 2018 Check finished_source_handlers_ for scheduling clean up task There has been an obvious mistake in handling stoppable source nodes; the check looks up active_source_nodes_ instead of finished_source_handlers_. This CL is one-line change to fix it. This change reduces 8% of CPU load within AudioDestinationHandler::Render() call. More profiling data can be found: https://docs.google.com/document/d/13ogSCFiXWCMjQv-D_nnKkEKoZlN8g8N9WUN1kMHJeKg/edit#bookmark=id.wd27wugm4ok9 Bug: 804946 Test: CL passes existing layout tests Change-Id: I2dcd3809384732a80b6bec207eeb8a7051a66758 Reviewed-on: https://chromium-review.googlesource.com/911935 Commit-Queue: Hongchan Choi <hongchan@chromium.org> Reviewed-by: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#535844} [modify] https://crrev.com/ce864914c1d10e96ac62a9ec99158ac48de5d07a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
,
Feb 15 2018
Issue 756238 has some updated benchmark results showing that we are much better with this CL than before. But we also have quite a ways to go compared to Firefox nightly on some tests, especially the granular synthesis test.
,
Mar 29 2018
Re #3: Do we have any plan/idea on how to do more optimization?
,
Mar 29 2018
Issue 819742 has been merged into this issue.
,
Mar 29 2018
For the benchmarks, I think we just need to select the tests that we think are too slow and profile them and figure out where all the time is being spent. I do think we can speed things up a bit more (maybe?) if we fixed issue 819742 .
,
Mar 29 2018
The issue 819742 is fixed by the CL in #2. No?
,
Mar 29 2018
Read the description in issue 819742 . If the main thread is slow, we can still end up calling clean up too many times, even with this fix. |
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Jan 23 2018