We are currently shipping our .apk with all -keeps that we require for instrumentation tests. This is causing unneeded bloat and memory overhead.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/385a49f0676c8cba918439054e21c9bf5a24b914 commit 385a49f0676c8cba918439054e21c9bf5a24b914 Author: smaier <smaier@chromium.org> Date: Wed Jul 20 13:22:47 2016 Moving all for test keeps into for test flags file. This saves 137kb of .dex size and 16kb of dirty memory per process. BUG= 626710 Review-Url: https://codereview.chromium.org/2131353002 Cr-Commit-Position: refs/heads/master@{#406544} [modify] https://crrev.com/385a49f0676c8cba918439054e21c9bf5a24b914/chrome/android/java/proguard.flags [modify] https://crrev.com/385a49f0676c8cba918439054e21c9bf5a24b914/testing/android/proguard_for_test.flags
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d50624e2e5a9d9fe13596d83e73385c9c44069e9 commit d50624e2e5a9d9fe13596d83e73385c9c44069e9 Author: smaier <smaier@chromium.org> Date: Fri Aug 05 14:21:10 2016 Merging under test java into instrumentation test java. This enables us to run all ProGuard uninhibited by tests, since Proguard will now consider both the tests and the tested code while performing its optimizations. This is opposed to running ProGuard on the tested java, keeping stuff around for the tests, which would then use the tested code as a library. This turns on optimizations and removes test code from the shipped apk, saving us ~550kb in .dex size, and ~70kb memory per process. BUG=620323, 625704 , 626710 Review-Url: https://codereview.chromium.org/2182303002 Cr-Commit-Position: refs/heads/master@{#410056} [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/BUILD.gn [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/base/android/base_proguard_config.flags [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/build/android/gyp/util/proguard_util.py [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/build/android/gyp/write_build_config.py [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/build/config/android/config.gni [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/build/config/android/internal_rules.gni [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/build/config/android/rules.gni [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/chrome/android/BUILD.gn [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/chrome/android/chrome_public_apk_tmpl.gni [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/chrome/android/webapk/libs/runtime_library/javatests/src/org/chromium/webapk/lib/runtime_library/WebApkServiceImplTest.java [modify] https://crrev.com/d50624e2e5a9d9fe13596d83e73385c9c44069e9/testing/android/proguard_for_test.flags
Comment 1 by bugdroid1@chromium.org
, Jul 20 2016