GetSignalStrengthDbm blocks the IO thread on Android |
||
Issue descriptionChrome Version: M57 OS: Android What steps will reproduce the problem? 1. Checkout M57 (branch 2987) to build Android Chrome. 2. Apply the patch https://crrev.com/2833753002/ to add TRACE_EVENTs 3. Build chrome_public_apk and install the apk to the android device. 4. On the device: 4.1. Open https://horo-test.appspot.com/navigationpreload/demo/ 4.2. Click "Register SW" button 4.3. Click "test" link 5. On the PC: 5.1. Open chrome://inspect/?tracing#devices 5.2. Click "close" of Worker. 5.3. Click "trace" to chrome://tracing/ of the device 5.4. Click "Record" -> Manually select settings 5.5. Select all "Record Categories" 5.6. Select "loading", "net" and "network" of "Disabled by Default Categories". 5.7. Click "Record" 5.8. Click "reload" of chrome://inspect/?tracing 5.9. Click "Stop" of chrome://tracing/ The attached image is the trace of Nexus 4 (Android 5.1.1). cellular_signal_strength::GetSignalStrengthDbm is blocking the IO thread 70 ms. This demo site is using ServiceWorker Navigation Preload. If the server returns the preload response quickly, and GetSignalStrengthDbm() is executed while Chrome is starting the ServiceWorker. This causes the service worker startup latency. I think this patch (https://crrev.com/976a4b6) was merged to M58, so this problem doesn't happen on M58 if NQE experiment is disabled. But if NQE is enabled, this problem will happen again. To: NQE team Is the cost of GetSignalStrengthDbm on the IO thread "70ms" appropriate?
,
Apr 20 2017
I have one question. I think 70 ms is a big performance problem. This probrem occurs even if the site is not using service worker. Didn't the perf bots detect any regression? Haven't you received any regression report yet?
,
Apr 20 2017
No, there were no regression reports from perf bots. Initially (M-57 and before), the call to GetSignalStrengthDbm was unconditional. M-58 and later versions guarded the call behind the NQE experiment. Do you see the regression when the device is connected to cellular network or Wi-Fi or does the regression happen regardless of the network type?
,
Apr 20 2017
I tested with wifi. I received a regression report mail about service worker navigation preload. While I was inspecting the regression, I found that something is blocking the IO thread. I think it is caused by NQE. But I don't have 100% confidence. I CCed the mail to you.
,
Apr 20 2017
Thanks. Right, the problem is only on M-57 and earlier versions. |
||
►
Sign in to add a comment |
||
Comment 1 by tbansal@chromium.org
, Apr 20 2017