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

Issue 808053005: Speed up Android resource extraction in the common case (nothing to do) (Closed)

Created:
5 years, 11 months ago by Benoit L
Modified:
5 years, 11 months ago
Reviewers:
pasko, nyquist
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Speed up Android resource extraction in the common case (nothing to do) In the vast majority of cases (no update and no locale change), there is actually nothing to extract at startup. This commit fixes the logic that allows for a quick exit in this case. Instrumentation shows that the cost of the useless checks that are currently done is very large (400+ms on hammerhead with Lollipop for a cold start). Add instrumentation to the Android resource extraction. The instrumentation uses android.os.Trace instead of the more common org.chromium.base.TraceEvent as the resource extraction is typically done before the native library initialization, so TraceEvent calls are dropped (per TraceEvent documentation). BUG=445718 Committed: https://crrev.com/648a2e7ab2989441a5df20b19d61cc2be9e166fe Cr-Commit-Position: refs/heads/master@{#311312}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Rebase. #

Patch Set 3 : Remove filenames as it is not required and not used elsewhere. #

Patch Set 4 : Rebase #

Patch Set 5 : Diff against base issue 805693003 #

Total comments: 4

Patch Set 6 : Addressing pasko's comments. #

Patch Set 7 : With proper diff against previous version. #

Total comments: 4

Patch Set 8 : Addressing nyquist's comment. #

Patch Set 9 : Rebase. #

Patch Set 10 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -19 lines) Patch
M base/android/java/src/org/chromium/base/ResourceExtractor.java View 1 2 3 4 5 6 7 8 9 8 chunks +16 lines, -19 lines 0 comments Download

Messages

Total messages: 17 (3 generated)
Benoit L
5 years, 11 months ago (2014-12-31 16:59:38 UTC) #2
pasko
I like the idea of the fix! Let's first land the CL that this depends ...
5 years, 11 months ago (2015-01-01 11:57:33 UTC) #3
Benoit L
New version of the CL: - Remove "filenames" that is not used anywhere else - ...
5 years, 11 months ago (2015-01-07 18:21:49 UTC) #4
pasko
I am mostly happy, small suggestions only. Had trouble trying to understand the original logic ...
5 years, 11 months ago (2015-01-08 16:47:15 UTC) #5
Benoit L
https://codereview.chromium.org/808053005/diff/80001/base/android/java/src/org/chromium/base/ResourceExtractor.java File base/android/java/src/org/chromium/base/ResourceExtractor.java (right): https://codereview.chromium.org/808053005/diff/80001/base/android/java/src/org/chromium/base/ResourceExtractor.java#newcode37 base/android/java/src/org/chromium/base/ResourceExtractor.java:37: private static final String PAK_FILENAMES = "Pak filenames"; On ...
5 years, 11 months ago (2015-01-08 17:24:42 UTC) #6
pasko
lgtm, thank you
5 years, 11 months ago (2015-01-08 17:44:30 UTC) #7
Benoit L
Hello, This is the follow-up CL to (the already LGTM'd CL) https://codereview.chromium.org/805693003 . This one ...
5 years, 11 months ago (2015-01-08 17:50:40 UTC) #9
nyquist
https://codereview.chromium.org/808053005/diff/120001/base/android/java/src/org/chromium/base/ResourceExtractor.java File base/android/java/src/org/chromium/base/ResourceExtractor.java (right): https://codereview.chromium.org/808053005/diff/120001/base/android/java/src/org/chromium/base/ResourceExtractor.java#newcode50 base/android/java/src/org/chromium/base/ResourceExtractor.java:50: return file.equals(ICU_DATA_FILENAME) Nit: How about flipping the equals statement ...
5 years, 11 months ago (2015-01-08 18:24:19 UTC) #10
Benoit L
Thank you for the review. https://codereview.chromium.org/808053005/diff/120001/base/android/java/src/org/chromium/base/ResourceExtractor.java File base/android/java/src/org/chromium/base/ResourceExtractor.java (right): https://codereview.chromium.org/808053005/diff/120001/base/android/java/src/org/chromium/base/ResourceExtractor.java#newcode50 base/android/java/src/org/chromium/base/ResourceExtractor.java:50: return file.equals(ICU_DATA_FILENAME) On 2015/01/08 ...
5 years, 11 months ago (2015-01-09 17:10:47 UTC) #11
Benoit L
Friendly ping :-) On 2015/01/09 17:10:47, lizeb wrote: > Thank you for the review. > ...
5 years, 11 months ago (2015-01-13 15:17:45 UTC) #12
nyquist
thanks for the ping! lgtm
5 years, 11 months ago (2015-01-13 17:23:42 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/808053005/180001
5 years, 11 months ago (2015-01-13 18:43:44 UTC) #15
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 11 months ago (2015-01-13 19:46:48 UTC) #16
commit-bot: I haz the power
5 years, 11 months ago (2015-01-13 19:47:59 UTC) #17
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/648a2e7ab2989441a5df20b19d61cc2be9e166fe
Cr-Commit-Position: refs/heads/master@{#311312}

Powered by Google App Engine
This is Rietveld 408576698