Fresco: Dynamically link jpegturbo lib for reduce library size.

Created on 2 Mar 2017  路  2Comments  路  Source: facebook/fresco

I've noticed native lib jpegturbo is both statically linked in bellowing module:

It's size is 165KB kb in armeabi-v7 and 409KB in x86 (so big!), would cause a lot of redundant apk size!

Since every body who use static-webp library would and must already have imagepipeline in their app, so I think we can do some trick:

  • make fb_jpegturbo as a shared library and dynamically link them in two modules;
  • after ndk-build success in static-webp, delete fb_jpegturbo.so in this module otherwise it would conflict with imagepipeline's.

If this idea is accepted, I would give a PR in several days.

bug build enhancement

Most helpful comment

@lambdapioneer PR #1686

All 2 comments

Hi @desmond1121, thanks for raising this issue! Having both projects statically linking against a larger library sounds bad and we should fix this. Your solution sounds good and hopefully there's an easy way to do this.

Definitely looking forward to read your PR! 馃憤 Would great to have some numbers on the size win.

@lambdapioneer PR #1686

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cococool picture cococool  路  4Comments

sungerk picture sungerk  路  3Comments

eldk picture eldk  路  3Comments

kingty picture kingty  路  4Comments

ykostova picture ykostova  路  3Comments