Commit 74bf0b96 authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Android: moving Webview seed fetch to thread pool

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 can use the THREAD_POOL_EXECUTOR instead,
since this use doesn't appear to rely on the concurrency guarantees that
SERIAL_EXECUTOR provides.

Bug: 869907
Change-Id: I7dce5b4f28520a3d2a81491756f5aec5f6806fa9
Reviewed-on: https://chromium-review.googlesource.com/1158962Reviewed-by: default avatarPaul Miller <paulmiller@chromium.org>
Reviewed-by: default avatarRichard Coles <torne@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579862}
parent 6f92518b
...@@ -163,7 +163,7 @@ public class AwVariationsSeedFetcher extends JobService { ...@@ -163,7 +163,7 @@ public class AwVariationsSeedFetcher extends JobService {
// If this process has survived since the last run of this job, mFetchTask could still // If this process has survived since the last run of this job, mFetchTask could still
// exist. Either way, (re)create it with the new params. // exist. Either way, (re)create it with the new params.
mFetchTask = new FetchTask(params); mFetchTask = new FetchTask(params);
mFetchTask.execute(); mFetchTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
return true; return true;
} }
......
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