From ee6de1466bc98e27bd414c9a7451f2aee3f9e721 Mon Sep 17 00:00:00 2001 From: Dan Zivkovic Date: Tue, 23 Jun 2015 10:25:58 -0700 Subject: [PATCH 1/2] Do not decorate committed spans. Users rarely tap on committed words, and the cost of sending the spans back through the input connection, back and forth to the target app, is too high. Bug 21926256. Change-Id: I8e55b57ce2148ed313dc927425b6d9c958634958 --- .../android/inputmethod/latin/inputlogic/InputLogic.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 87c3ddbc8..a25fb297b 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -2135,9 +2135,10 @@ public final class InputLogic { final SuggestedWords suggestedWords = mSuggestedWords; // TODO: Locale should be determined based on context and the text given. final Locale locale = getDictionaryFacilitatorLocale(); - final CharSequence chosenWordWithSuggestions = - SuggestionSpanUtils.getTextWithSuggestionSpan(mLatinIME, chosenWord, - suggestedWords, locale); + final CharSequence chosenWordWithSuggestions = chosenWord; + // b/21926256 + // SuggestionSpanUtils.getTextWithSuggestionSpan(mLatinIME, chosenWord, + // suggestedWords, locale); if (DebugFlags.DEBUG_ENABLED) { long runTimeMillis = System.currentTimeMillis() - startTimeMillis; Log.d(TAG, "commitChosenWord() : " + runTimeMillis + " ms to run " From 79e7cb75010a584da2679c08e9e655c4cd4ba763 Mon Sep 17 00:00:00 2001 From: Dan Zivkovic Date: Tue, 23 Jun 2015 13:06:06 -0700 Subject: [PATCH 2/2] LatinIME portion of StatsUtil change. Bug 22010482. Change-Id: Iaed8abfb13cf4c87895a968d545dca3e5fcf9081 --- .../src/com/android/inputmethod/latin/utils/StatsUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java index 678597792..03e58478b 100644 --- a/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java +++ b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java @@ -104,4 +104,7 @@ public final class StatsUtils { public static void onInputConnectionLaggy(final int operation, final long duration) { } + + public static void onDecoderLaggy(final int operation, final long duration) { + } }