Closed Bug 1242589 Opened 8 years ago Closed 4 years ago

New first run images increase APK size

Categories

(Firefox for Android Graveyard :: First Run, defect)

defect
Not set
normal

Tracking

(fennec+)

RESOLVED INCOMPLETE
Tracking Status
fennec + ---

People

(Reporter: Margaret, Unassigned)

References

Details

Attachments

(1 file)

mfinkle used pngquant to reduce the size of the new images added in bug 1238780, but is there anything else we can do to make this less of a problem?

I'm also worried about this becoming more of a problem as we add even more tests and market-specific slides to our onboarding flow.
I was thinking about cropping the images to remove any unneeded margins/padding. We can use a layout with a background color and position the images in the center.
tracking-fennec: --- → ?
We talked about this in the Android meeting today. We also brought up the idea of using svg instead of png images.
Anthony, if you already have the images, could you upload a set with svg instead of png? Also, I thought there might be extra horizontal padding on the images, but I'm not sure. If there are, we could also remove that - the code centers the images in both axes so we don't need it.

It looks like 21+ (Lollipop and beyond) allows using svgs without any extra libraries, but we may need to use an svg library for GB and 14-20.
Flags: needinfo?(alam)
Attached file SVG.zip
Here are some SVGs to play with. As we talked about, they have padding though since the images are not all centered if I don't include it.

I can remove them too if you'd like
Flags: needinfo?(alam)
tracking-fennec: ? → 46+
Are we doing anything to address this for 46?
Flags: needinfo?(liuche)
Pinging this bug again... at this point, I think we're just going to eat this cost for 46, but we should explore using SVG for the future, since we're planning to continue to add images to this first run experience.
Version 23.2 of the support library added backward-compatible support for vector drawables:
http://android-developers.blogspot.de/2016/02/android-support-library-232.html

However it seems to be a bit more complicated than just dropping SVGs.
Short answer is, no, there's nothing to do here for 46. But we should come up with a solution here to help reduce our APK size.
tracking-fennec: 46+ → +
Blocks: fatfennec
Flags: needinfo?(liuche)
(In reply to Sebastian Kaspari (:sebastian) from comment #7)
> Version 23.2 of the support library added backward-compatible support for
> vector drawables:
> http://android-developers.blogspot.de/2016/02/android-support-library-232.
> html
> 
> However it seems to be a bit more complicated than just dropping SVGs.

We now have VectorDrawable support... but Google recommend only using that for images up to 200 x 200dp because of the performance impact of rendering large vector images. I have however filed Bug 1314328 to investigate converting these images to webp for at least some size reduction.

( Search for "200 x 200" in https://developer.android.com/studio/write/vector-asset-studio.html )

To be fair, I haven't measured the performance impact of rendering large SVG images, but it doesn't seem like a good idea to have slowly rendered images the very first time a user interacts with Fennec.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: