summaryrefslogtreecommitdiff
path: root/docs/html/sdk/api_diff/24/changes.html
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2016-06-13 22:16:52 -0700
committerYohei Yukawa <yukawa@google.com>2016-06-14 21:01:41 +0000
commitccb024aa2b985ddc7f65b53191a84f1891f31cf2 (patch)
tree346df592527d7f56986c5adb0b231a05efa8f881 /docs/html/sdk/api_diff/24/changes.html
parent82f2df610894c6e423311467943a37330dbaa66b (diff)
Quick workaround for a performance regression in IME APIs.
It turns out that the performance of InputMethodManager#getCurrentInputMethodSubtype() is regressed from ~1ms to ~20ms when - Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE == -1 and - The active IME supports many subtypes (~100) because we try to find a fallback subtype based on the system locales every time when IMM#getCurrentInputMethodSubtype() is called. This could be contributing UI janks because spell checker clients running in the UI thread indirectly depend on that method. Fortunatelly the critical path is in InputMethodUtils#getImplicitlyApplicableSubtypesLockedImpl(), which is basically a state-less method. We can easily and safely cache its result by using LocaleList and InputMethod as cache keys. With this CL the performance basically recovers to the Android M level. Bug: 28889203 Change-Id: I5ed16c7f14cc18052854f4fd6c9bae8550c332ee
Diffstat (limited to 'docs/html/sdk/api_diff/24/changes.html')
0 files changed, 0 insertions, 0 deletions