Commit ec88843a authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Android: moving update check 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: I09f794fe73c706019ce42f16b505d9a1ee1757ea
Reviewed-on: https://chromium-review.googlesource.com/1159268Reviewed-by: default avatarTheresa <twellington@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580169}
parent cdc90822
...@@ -132,7 +132,8 @@ public class UpdateMenuItemHelper { ...@@ -132,7 +132,8 @@ public class UpdateMenuItemHelper {
activity.onCheckForUpdate(mUpdateAvailable); activity.onCheckForUpdate(mUpdateAvailable);
recordUpdateHistogram(); recordUpdateHistogram();
} }
}.execute(); }
.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
} }
/** /**
......
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