New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624714 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Chrome hangs when typing a lot of hindi

Project Member Reported by datom@google.com, Jun 30 2016

Issue description

Steps to reproduce the problem:
1. Opens a page with an input field (www.google.com or http://reference.sitepoint.com/html/textarea/demoframe) in chrome android
2. Switch your keyboard to Hindi
3. Start typing a lot of text.

What is the expected behavior?
No freeze

What went wrong?
If you keep typing fast, the UI will start hanging. Sometimes the tab needs to be closed to unfreeze the browser.

Did this work before? N/A 

Chrome version: 51.0.2704.81  Channel: n/a
OS Version: 6.0.1
Flash Version: 

Note that it happens on an android webview as well, but it does not seem to happen on native input (tested in hangout)
 
Project Member

Comment 1 by sheriffbot@chromium.org, Jun 30 2016

Labels: Hotlist-Google
Cc: ppolise...@chromium.org
Labels: triage-te

Comment 3 by drott@chromium.org, Jul 1 2016

Cc: yosin@chromium.org

Comment 4 by yosin@chromium.org, Jul 1 2016

Cc: nona@chromium.org
nona@, any idea?

Comment 5 by nona@chromium.org, Jul 1 2016

Yeah, this is reproducible with Android Hindi input.
After some investigation this is not only for Hindi, this is reproducible with Arabic and Persian too.

Also I tried same repro step on Chrome OS but this is not reproducible.

Currently I don't have any idea for the root cause but I think this should be high priority.

Comment 6 by nona@chromium.org, Jul 1 2016

I captured tracing on Android N DP3, and looks like the renderer takes quite long time to dispatch the keyevent.
Screenshot from 2016-07-01 17:17:52.png
136 KB View Download
trace_hindi_keyboard_hang.zip
2.4 MB Download

Comment 7 by nona@chromium.org, Jul 4 2016

Cc: kinaba@chromium.org yukawa@chromium.org
It turned out that this regression happens with https://codereview.chromium.org/1589953005/
With above change, blink start calculating the bounds of the composition, but it was not a lightweight calculation.

Actually, reviving #ifdef macro in UpdateCompositionInfo fixes this issue.

kinaba-san, do you have any idea to fix this issue?

Thank you.

Comment 8 by nona@chromium.org, Jul 4 2016

Owner: nona@chromium.org
Status: Assigned (was: Unconfirmed)
kinaba-san is super busy now. I'm going to take a look.

Comment 9 by nona@chromium.org, Jul 4 2016

I discussed with yosin@ and kojii@ and we got following consensus.

We may have two fix,
1. Do not calculate the composition bounds until IME requests.
  According to kinaba-san, currently Chrome calculate the composition bounds regardless of IME request.
By skipping this calculation, this issue should be fixed in many languages since currently limited IME requires composition bounds.

2. Make composition bounds calculation faster.
  According to yosin@ and kojii@, current firstRectForCharacterRange implementation is not so good for calculating composition bounds.
So there is a room for performance improvements.

I'm going to introduce above two fix.

Comment 10 by nona@chromium.org, Jul 5 2016

Update, it turned out that plan 1. in comment 9 is quite hard to do now.
Going to fix only with plan 2.

Comment 11 by nona@chromium.org, Jul 6 2016

Cc: aelias@chromium.org
+aelias
Cc: changwan@chromium.org
Components: -UI UI>Input>Text>IME
Plan 2 sounds good assuming we can get order-of-magnitude improvement with it, thanks!
Can we remove Restricted-View-Google from this thread?  So far it seems that no confidential topic is discussed here.
I'd be fine with removing Restrict-View-Google, but I don't know how.  It seems to be magic autolabel of some sort.
Labels: allpublic
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dac0c7af14c29c9d8509b775d5044e5448b6263b

commit dac0c7af14c29c9d8509b775d5044e5448b6263b
Author: nona <nona@chromium.org>
Date: Mon Aug 01 02:30:59 2016

Do not calculate composition bounds until IME requests.

Calculating composition bounds is not a light-weight operation.
On the other hand, few IME uses this information.
To skip this unnecessary calculation on certain environment, propagate
cursor update mode from browser to the renderer.

BUG= 624714 

Review-Url: https://codereview.chromium.org/2121953002
Cr-Commit-Position: refs/heads/master@{#408900}

[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/browser/renderer_host/ime_adapter_android.cc
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/browser/renderer_host/ime_adapter_android.h
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/common/input_messages.h
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/public/android/javatests/src/org/chromium/content/browser/input/CursorAnchorInfoControllerTest.java
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/renderer/render_widget.cc
[modify] https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b/content/renderer/render_widget.h

Comment 17 by nona@chromium.org, Aug 1 2016

Status: Fixed (was: Assigned)
Should be fixed now.
Project Member

Comment 18 by bugdroid1@chromium.org, Aug 4 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b24cbc456753503ec0f499c890acae6a5a2e3cc3

commit b24cbc456753503ec0f499c890acae6a5a2e3cc3
Author: aelias <aelias@chromium.org>
Date: Thu Aug 04 21:15:24 2016

Revert of Do not calculate composition bounds until IME requests. (patchset #11 id:720001 of https://codereview.chromium.org/2121953002/ )

Reason for revert:
CursorAnchorInfoControllerTest.testMonitorMode consistently failing on downstream lollipop bots (and I also see the same failure in the trybots for patchset 11, I don't understand why CQ let this through...).

BUG= 633402 

Original issue's description:
> Do not calculate composition bounds until IME requests.
>
> Calculating composition bounds is not a light-weight operation.
> On the other hand, few IME uses this information.
> To skip this unnecessary calculation on certain environment, propagate
> cursor update mode from browser to the renderer.
>
> BUG= 624714 
>
> Committed: https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b
> Cr-Commit-Position: refs/heads/master@{#408900}

TBR=changwan@chromium.org,kinaba@chromium.org,shuchen@chromium.org,yosin@chromium.org,yukawa@chromium.org,nasko@chromium.org,nona@chromium.org
NOTRY=true
BUG= 624714 

Review-Url: https://codereview.chromium.org/2210533004
Cr-Commit-Position: refs/heads/master@{#409901}

[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/browser/renderer_host/ime_adapter_android.cc
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/browser/renderer_host/ime_adapter_android.h
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/common/input_messages.h
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/public/android/javatests/src/org/chromium/content/browser/input/CursorAnchorInfoControllerTest.java
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/renderer/render_widget.cc
[modify] https://crrev.com/b24cbc456753503ec0f499c890acae6a5a2e3cc3/content/renderer/render_widget.h

Status: Assigned (was: Fixed)
Project Member

Comment 20 by bugdroid1@chromium.org, Aug 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa291796686fef74a48f18061b9e36ccc9488a06

commit fa291796686fef74a48f18061b9e36ccc9488a06
Author: nona <nona@chromium.org>
Date: Wed Aug 10 02:36:18 2016

Do not calculate composition bounds until IME requests.

Calculating composition bounds is not a light-weight operation.
On the other hand, few IME uses this information.
To skip this unnecessary calculation on certain environment, propagate
cursor update mode from browser to the renderer.

BUG= 624714 

Committed: https://crrev.com/dac0c7af14c29c9d8509b775d5044e5448b6263b
Review-Url: https://codereview.chromium.org/2121953002
Cr-Original-Commit-Position: refs/heads/master@{#408900}
Cr-Commit-Position: refs/heads/master@{#410927}

[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/browser/renderer_host/ime_adapter_android.cc
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/browser/renderer_host/ime_adapter_android.h
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/common/input_messages.h
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/public/android/javatests/src/org/chromium/content/browser/input/CursorAnchorInfoControllerTest.java
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/renderer/render_widget.cc
[modify] https://crrev.com/fa291796686fef74a48f18061b9e36ccc9488a06/content/renderer/render_widget.h

Project Member

Comment 21 by bugdroid1@chromium.org, Aug 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56a714e089de70102b0308f82bfe9b181b891022

commit 56a714e089de70102b0308f82bfe9b181b891022
Author: ekaramad <ekaramad@chromium.org>
Date: Thu Aug 11 06:47:10 2016

Request to start/stop calculating composition info from RenderWidget when it is active/inactive.

This CL sends the request to start/stop updating composition info to the
widget which became active/inactive, rather than sending it only to the
top level's render widget.

This CL also revises the test TrackCompositionRangeForAllFrames so that
it addresses OOPIFs.

BUG= 578168 , 602723 , 624714 

Review-Url: https://codereview.chromium.org/2208583005
Cr-Commit-Position: refs/heads/master@{#411278}

[modify] https://crrev.com/56a714e089de70102b0308f82bfe9b181b891022/chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc
[modify] https://crrev.com/56a714e089de70102b0308f82bfe9b181b891022/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/56a714e089de70102b0308f82bfe9b181b891022/content/browser/renderer_host/render_widget_host_view_aura.h
[modify] https://crrev.com/56a714e089de70102b0308f82bfe9b181b891022/content/public/test/text_input_test_utils.cc
[modify] https://crrev.com/56a714e089de70102b0308f82bfe9b181b891022/content/public/test/text_input_test_utils.h

Comment 22 by nona@chromium.org, Sep 15 2016

Status: Fixed (was: Assigned)

Sign in to add a comment