Commit 8bc2a358 authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Normalized APK Size: Remove 1.5 multiplier for dex

Two motivations:
1. Allows comparing trichrome (where dex is uncompressed) with
   Monochrome (where it is compressed).
2. Aligns with SuperSize breakdowns.

Change-Id: I86905c52d89a66b52adb05fe8b74df6666c7e485
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1839432Reviewed-by: default avatarMohamed Heikal <mheikal@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703395}
parent bec91d20
......@@ -462,7 +462,7 @@ def _DoApkAnalysis(apk_filename, apks_path, tool_prefix, out_dir, report_func):
# devices running Android O (which ~= uncompressed dex size).
# Use a constant compression factor to account for fluctuations.
normalized_apk_size -= java_code.ComputeZippedSize()
normalized_apk_size += int(java_code.ComputeUncompressedSize() * 1.5)
normalized_apk_size += java_code.ComputeUncompressedSize()
# Unaligned size should be ~= uncompressed size or something is wrong.
# As of now, padding_fraction ~= .007
padding_fraction = -_PercentageDifference(
......
......@@ -37,7 +37,7 @@ For Googlers, more information available at [go/chrome-apk-size](https://goto.go
* Computed as:
* The size of an APK
* With all native code as the sum of section sizes (except .bss), uncompressed.
* With all dex code counted as `uncompressed_size * 1.5` (meant to simulate Android Go on Oreo).
* With all dex code as if it were stored uncompressed.
* With all translations as if they were not missing (estimates size of missing translations based on size of english strings).
* Without translation-normalization, translation dumps cause jumps.
* Translation-normalization applies only to apks (not to Android App Bundles).
......
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