Start sandbox process early
This patch uses the warmUp mechanism to reduce TTFP. When the
user starts to enter a URL or uses the menu, a new child process
connection is established immediately. The new child process will
then start faster when the URL is entered or a bookmark is chosen.
Change-Id: I422617d0fd327603da55ad78736fbd6c85c9e6b3
diff --git a/src/com/android/browser/NavigationBarBase.java b/src/com/android/browser/NavigationBarBase.java
index 819608d..96a9896 100644
--- a/src/com/android/browser/NavigationBarBase.java
+++ b/src/com/android/browser/NavigationBarBase.java
@@ -46,6 +46,7 @@
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
+import org.codeaurora.swe.Engine;
import org.codeaurora.swe.WebView;
public class NavigationBarBase extends LinearLayout implements
@@ -154,6 +155,7 @@
setFocusState(hasFocus);
}
if (hasFocus) {
+ Engine.warmUpChildProcessAsync(mUiController.getActivity().getApplicationContext());
mBaseUi.showTitleBar();
} else if (!mUrlInput.needsUpdate()) {
mUrlInput.dismissDropDown();