Issue metadata
Sign in to add a comment
|
ScheduleMainThreadCleanup still called too often |
||||||||||||||||||||||
Issue descriptionIssue 804946 fixed the main problem of calling this too often, but I think we still call this too often. The audio thread calls HandleStoppableSourceNodes every render. If there are finished source handlers, ScheduleMainThreadCleanup is called. If the main thread is loaded, it doesn't clear out finished source handlers very quickly, and the audio thread could pile up many many cleanups. Maybe we should only schedule cleanups if there are finished handlers and if cleanups haven't been scheduled. Then we don't pile up lots of cleanup tasks, making the main thread even busier.
,
Mar 29 2018
> Maybe we should only schedule cleanups if there are finished handlers [1] and if cleanups haven't been scheduled [2]. [1]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp?type=cs&sq=package:chromium&l=720 [2]: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp?type=cs&sq=package:chromium&l=840 These two checks are already in the code? What more could be done?
,
Mar 29 2018
Ah, has_posted_cleanup_task_ should be enough. We're done here. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by hongchan@chromium.org
, Mar 29 2018Status: Duplicate (was: Available)