Initialize TtsPlatformImpl on background thread
Reported by
shu...@amazon.com,
Feb 20 2018
|
|||||||
Issue descriptionSteps to reproduce the problem: 1. Visit https://mdn.github.io/web-speech-api/speak-easy-synthesis/ 2. Observe log statements like the following in logcat: 02-19 15:55:19.801 6753 9748 W TTS : No local or network voice found, failing dispatch 02-19 15:55:19.801 6753 9748 W TTS : Could not find voice for yo ... 02-19 15:55:19.826 976 976 I Choreographer: Skipped 52 frames! The application may be doing too much work on its main thread. ... What is the expected behavior? Frames should not be getting skipped ideally. What went wrong? Since TtsPlatformImpl is being initialized on the UI thread, it is blocking that tread and causing frames to be skipped. We should ideally be initializing it on a background thread. Did this work before? N/A Chrome version: 66.0.3351.0 (master) Channel: stable OS Version: 6.0.1 Flash Version:
,
Feb 20 2018
Tested on Chrome #64.0.3282.137 and latest Canary #66.0.3350.0 on SM-J710F Build/NRD90M, observed that text entered in the text box is read out clearly with respect to the rate and pitch upon tapping on the enter key in keypad. shubag@ -- Could you please let us know how to verify the issue functionally. Thanks in advance!
,
Feb 20 2018
,
Feb 23 2018
pnangunoori@ -- This isn't reporting a bug in functionality. Rather, it reports a performance issue - UI thread getting blocked and skipping frames. To verify this issue, you'd need to use adb logcat and observe log statements like the one mentioned in the description.
,
Feb 23 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Feb 28 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5c51f9ddd9e948cc07c401709757946231ce9649 commit 5c51f9ddd9e948cc07c401709757946231ce9649 Author: Shubham Agrawal <shubag@amazon.com> Date: Wed Feb 28 16:27:56 2018 Initialize TtsPlatformImpl on background thread TtsPlatformImpl#initialize() calls TextToSpeech#isLanguageAvailable for each of the installed locales. This call can result in certain calls to the platform which end up doing I/O tasks. Since this method is run on the UI thread, it causes those I/O tasks to be performed on the UI thread as well. This change fixes that issue by ensuring that that method is called on a background thread, and only the calls necessary to run on the UI thread run on it. Bug: 813669 Test: Manually verified that skipped frames are no longer reported Change-Id: If092b23eeed35b5384daa5f045c09fb8eda63281 Reviewed-on: https://chromium-review.googlesource.com/925822 Commit-Queue: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Cr-Commit-Position: refs/heads/master@{#539844} [modify] https://crrev.com/5c51f9ddd9e948cc07c401709757946231ce9649/AUTHORS [modify] https://crrev.com/5c51f9ddd9e948cc07c401709757946231ce9649/chrome/android/java/src/org/chromium/chrome/browser/TtsPlatformImpl.java
,
May 31 2018
shubag@ -- Could you please confirm whether the fix is landed and the issue can be closed. If landed, please update the issue accordingly. Thanks!
,
May 31 2018
Yea, the fix for this landed a while back (as per comment #6). I'm not sure what you mean by updating the issue. I don't see a button to close the bug (maybe I don't have permissions?).
,
May 31 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 1 2018
Updating the status to 'Fixed' as per the comment #8. Thanks! |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by shu...@amazon.com
, Feb 20 2018