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

Issue 842244 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task

Blocking:
issue 823461



Sign in to add a comment

Bundle less images from //components/resources in //ios/web_view

Project Member Reported by jzw@chromium.org, May 11 2018

Issue description

Right now all images are around 100KB. We can cut down on this in two ways:

1. Only bundle @2x and @3x, since we do not support any @1x devices.
2. Only bundle autofill images.
 
> 1. Only bundle @2x and @3x, since we do not support any @1x devices.

I heard that unused images are stripped by AppStore before a user downloads an app. So I guess this won't affect the real download size?
These images will not be stripped because they are packaged in a custom format (.pak). In order to be removed, they need to be in an asset catalog. We already have support for asset catalogs here: https://cs.chromium.org/chromium/src/build/config/ios/asset_catalog.gni

For an example: https://cs.chromium.org/chromium/src/ios/chrome/app/resources/BUILD.gn?rcl=88d6260b36538a399f8ac1006d34a93d403b7e80&l=159

Comment 3 by jzw@chromium.org, May 14 2018

We could convert to asset catalogs, however we'll need to generate a  .imageset folder structure in //out/gen/... with a Content.json that references the proper images in //components/resources/default_xxx_percent/autofill/*.png. This would break if the location of the images moved though.

Alternatively, we can maintain our own copies in //ios/web_view/resources/*.imageset. Though if new images become available, we'd need to update manually.

Maybe there's yet another way?

Comment 4 by jzw@chromium.org, May 16 2018

Status: Available (was: Untriaged)
Status: Assigned (was: Available)

Sign in to add a comment