Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Issue 1469803007: Extend the multidex logic to only kick in for the main browser application. (Closed)

Created:
5 years ago by Ted C
Modified:
5 years ago
Reviewers:
nyquist, Yaron, jbudorick
CC:
chromium-reviews, darin-cc_chromium.org, jam, vmpstr+watch_chromium.org, Yaron
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Extend the multidex logic to only kick in for the main browser application. For each Application instances that falls into the Multidex path, there is a regression in startup time as it must bootstrap the classloader to be able to access the additional sources. During a normal run of Chrome on Android, there are three Application instances created (Main Browser, Renderer, and GPU). The renderer process is an isolated process, which was being skipped with the existing check in this file. The problem is with the GPU process. We had the assumption that all non-isolated processes would only be hit once by the Multidex startup regression, but it turns out that any Application in a different process is hit by the same slowdown. This means that the first time the page attempts to paint anything, you see a hang as the GPU process is attempting to initialize. This results in a bunch of tests (mainly on K builds on slow devices) to start flaking as they timeout trying to load the first non about:blank page. This change extends the existing check for isolated process to also skip initializing multi dex for anything running in a separate process. As a result, anything running in a different process will need to ensure all code is included in the main dex or force the additional dex files to be loaded (not as of yet needed), but we no longer see the slow down on basic operations in Chrome. BUG=560600 Committed: https://crrev.com/ae7c11660f7b39f2d5c4dc28baf404a45aa0fc2d Cr-Commit-Position: refs/heads/master@{#361738}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Check for privileged_process explicitly #

Patch Set 3 : Switch to using manifest xml #

Total comments: 6

Patch Set 4 : Address review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -18 lines) Patch
M base/android/java/templates/ChromiumMultiDex.template View 1 2 3 4 chunks +65 lines, -17 lines 0 comments Download
M chrome/android/java/AndroidManifest.xml View 1 2 3 1 chunk +5 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/common/SurfaceWrapper.java View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 24 (8 generated)
Ted C
PTAL cc yfriedman@ to be amazed/disgusted by the glory
5 years ago (2015-11-24 23:45:25 UTC) #2
nyquist
Thanks for putting this hack in the multidex code instead of as a generic tool ...
5 years ago (2015-11-25 00:12:52 UTC) #3
Ted C
On 2015/11/25 00:12:52, nyquist wrote: > Thanks for putting this hack in the multidex code ...
5 years ago (2015-11-25 00:49:44 UTC) #5
Ted C
Updated to check for privileged processes explicitly. This is a gross check to be in ...
5 years ago (2015-11-25 01:47:23 UTC) #6
Yaron
Can't really think of a good answer. If you're already getting the process name, you ...
5 years ago (2015-11-25 01:48:10 UTC) #8
Ted C
On 2015/11/25 01:48:10, Yaron wrote: > Can't really think of a good answer. If you're ...
5 years ago (2015-11-25 02:36:56 UTC) #9
jbudorick
On 2015/11/25 02:36:56, Ted C wrote: > On 2015/11/25 01:48:10, Yaron wrote: > > Can't ...
5 years ago (2015-11-25 15:16:15 UTC) #10
Ted C
Just uploaded a version that uses the manifest meta-data approach. How does that look?
5 years ago (2015-11-25 17:26:15 UTC) #11
jbudorick
https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template File base/android/java/templates/ChromiumMultiDex.template (right): https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template#newcode51 base/android/java/templates/ChromiumMultiDex.template:51: && !shouldInstallMultiDex(context)) { One other thing to consider: we ...
5 years ago (2015-11-25 18:13:36 UTC) #13
Ted C
https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template File base/android/java/templates/ChromiumMultiDex.template (right): https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template#newcode51 base/android/java/templates/ChromiumMultiDex.template:51: && !shouldInstallMultiDex(context)) { On 2015/11/25 18:13:35, jbudorick wrote: > ...
5 years ago (2015-11-25 18:17:15 UTC) #14
nyquist
lgtm https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template File base/android/java/templates/ChromiumMultiDex.template (right): https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template#newcode29 base/android/java/templates/ChromiumMultiDex.template:29: private static final String IGNORE_MULTIDEX_KEY = ".ignore_multidex"; Could ...
5 years ago (2015-11-25 18:57:20 UTC) #15
Yaron
lgtm https://codereview.chromium.org/1469803007/diff/40001/chrome/android/java/AndroidManifest.xml File chrome/android/java/AndroidManifest.xml (right): https://codereview.chromium.org/1469803007/diff/40001/chrome/android/java/AndroidManifest.xml#newcode608 chrome/android/java/AndroidManifest.xml:608: <meta-data android:name="{{ manifest_package }}{{ privileged_process_name }}.ignore_multidex" nit: omit ...
5 years ago (2015-11-25 19:02:59 UTC) #16
Ted C
https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template File base/android/java/templates/ChromiumMultiDex.template (right): https://codereview.chromium.org/1469803007/diff/40001/base/android/java/templates/ChromiumMultiDex.template#newcode29 base/android/java/templates/ChromiumMultiDex.template:29: private static final String IGNORE_MULTIDEX_KEY = ".ignore_multidex"; On 2015/11/25 ...
5 years ago (2015-11-25 19:14:11 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1469803007/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1469803007/60001
5 years ago (2015-11-25 19:22:13 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years ago (2015-11-25 21:16:18 UTC) #22
commit-bot: I haz the power
5 years ago (2015-11-25 21:17:35 UTC) #24
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ae7c11660f7b39f2d5c4dc28baf404a45aa0fc2d
Cr-Commit-Position: refs/heads/master@{#361738}

Powered by Google App Engine
This is Rietveld 408576698