New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 789933 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 14
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Feature



Sign in to add a comment

We could save possibly some space in APK

Project Member Reported by mar...@mwiacek.com, Nov 30 2017

Issue description

Steps to reproduce the problem:
1. build ChromePublic.apk

What is the expected behavior?
Files inside apk don't have unnecessary content

What went wrong?
assets/chrome_100_percent.pak, assets/natives_blob.bin, assets/resources.pak have HTML content with spaces and comments; By initial compressing it we could save some space and make processing it a little faster, maybe it's worth?

Did this work before? No 

Chrome version: 64.0.3281.2  Channel: canary
OS Version: 7
Flash Version:
 

Comment 1 by mar...@mwiacek.com, Dec 12 2017

Some first part of patch work: https://chromium-review.googlesource.com/c/v8/v8/+/821071
Cc: estevenson@chromium.org agrieve@chromium.org

Comment 4 by dpa...@chromium.org, Jan 16 2018

Have you considered gzipping such resources instead of minifying them, to save space? Example CL at [1]

IMO using parking additional functionality within GRIT, such as JS minification is not a great approach to begin with, and I've tried to capture why our usage of GRIT is fairly problematic, at least for WebUI, see [2] 

[1] https://chromium-review.googlesource.com/c/chromium/src/+/770550 
[2] https://docs.google.com/document/d/1Z18WTNv28z5FW3smNEm_GtsfVD2IL-CmmAikwjw3ryo/edit#heading=h.pmqrv7fqbjg6
Components: Build

Comment 8 by bauerb@chromium.org, Jan 19 2018

Cc: aber...@chromium.org dbeam@chromium.org
Components: UI>Browser>WebUI
+dbeam, aberent (although I think they are already aware?)

Comment 9 by mar...@mwiacek.com, Jan 19 2018

The more people the better, some discussion is also in the https://chromium-review.googlesource.com/c/chromium/src/+/853500, generally it looks, that we need one generic approach for handling HTML, JS, CSS, SVG...
Status: Untriaged (was: Unconfirmed)
*** Bulk edit ***

Setting Feature Requests as: Untriaged 

Comment 11 by donnd@google.com, Apr 24 2018

Components: -UI>Browser>WebUI
Labels: android-fe-triaged
Is there a reason we can't just zip-compress everything?

I don't think this is related to WebUI or android frontend.
In answer to #11; yes, there are reasons for not zip-compressing everything. This has been discussed a number of times before, but I will summarize.

There are three possible reasons for making the APK smaller:

1 - To reduce it's size in storage on the device. Zip compression of the PAK files and resources will work here.
2 - To reduce the network usage when downloading the APK. Play store downloads are compressed in transit, double compression rarely works, and sometimes actually makes things larger.
3 - To reduce the size of Chrome in memory. At the moment the PAK files and resources are memory mapped directly from the APK. If they were compressed then they would have to be inflated in memory before being used. This would both slow down Chrome startup, and require Chrome to allocate memory, or a memory mapped file, to store the inflated PAK files and resources. In addition Chrome would require some working memory for inflation.

In other words, compressing everything would reduce the size on disk but would add significantly to memory usage, and could affect performance. It would make no difference to download cost.

Sign in to add a comment