Commit 61985bcc authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Android: SmartSelectionRequests explicitly on SERIAL_EXECUTOR

Currently, AsyncTask.execute() defaults to the SERIAL_EXECUTOR. This
exector is good for preventing concurrency errors since it guarantees
serial execution, but bad for performance since the entire app shares
this single queue.

It looks like this callsite is stuck on the SERIAL_EXECUTOR. We make
this requirement explicit.

Bug: 869907
Change-Id: I651a27380b514600793a248babd41aa556983fb1
Reviewed-on: https://chromium-review.googlesource.com/1162714Reviewed-by: default avatarPedro Amaral <amaralp@chromium.org>
Reviewed-by: default avatarShimi Zhang <ctzsm@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581307}
parent c84877f7
...@@ -112,7 +112,7 @@ public class SmartSelectionProvider { ...@@ -112,7 +112,7 @@ public class SmartSelectionProvider {
mClassificationTask = mClassificationTask =
new ClassificationTask(classifier, requestType, text, start, end, locales); new ClassificationTask(classifier, requestType, text, start, end, locales);
mClassificationTask.execute(); mClassificationTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR);
} }
@TargetApi(Build.VERSION_CODES.O) @TargetApi(Build.VERSION_CODES.O)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment