Commit 2f32eb00 authored by Sam Maier's avatar Sam Maier Committed by Commit Bot

Android: GCMDriver AsyncTasks moved to THREAD_POOL_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 these callsites can use the THREAD_POOL_EXECUTOR instead,
since these usages don't appear to rely on the concurrency guarantees
that SERIAL_EXECUTOR provides.

Bug: 869907
Change-Id: If2c63496e7851db697e313429baa10508aeb4753
Reviewed-on: https://chromium-review.googlesource.com/1162691Reviewed-by: default avatarMichael van Ouwerkerk <mvanouwerkerk@chromium.org>
Commit-Queue: Sam Maier <smaier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581218}
parent 2e57b319
......@@ -81,7 +81,7 @@ public class GCMDriver {
!registrationId.isEmpty());
}
}
.execute();
.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
@CalledByNative
......@@ -104,7 +104,7 @@ public class GCMDriver {
nativeOnUnregisterFinished(mNativeGCMDriverAndroid, appId, success);
}
}
.execute();
.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
// The caller of this function is responsible for ensuring the browser process is initialized.
......
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