You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the current version (0.2.2), the binary size (all ABIs combined) is about 12MB, which is huge. It is 100% possible to reduce that. Three things worth mentioning:
There is a binary size optimization flag in the configure script of FFmpeg. It disables performance optimizations, so it can be potentially harmful.
Build libgdx-oboe.so with LTO optimizations. I believe, this requires FFmpeg libs to be statically built, but that's not a problem.
Incorporate strip as a last built step; however, if I'm not mistaken, the NDK toolchain already does that.
The text was updated successfully, but these errors were encountered:
I wasn't able to link static ffmpeg libraries, so LTO wasn't really an option here.
Binary size optimization flag didn't do much.
Using -O2 -flto=full -ffunction-sections -fdata-sections -fvisibility=hidden cxx/c flags along with --as-needed link flags were useful.
strip was super useful.
All in all, I got the library size cut down to 6.7 MB (-45%). I did everything I knew to reduce size, so if there any other method, reopen this issue / PR it !
As per the current version (0.2.2), the binary size (all ABIs combined) is about 12MB, which is huge. It is 100% possible to reduce that. Three things worth mentioning:
configure
script of FFmpeg. It disables performance optimizations, so it can be potentially harmful.libgdx-oboe.so
with LTO optimizations. I believe, this requires FFmpeg libs to be statically built, but that's not a problem.strip
as a last built step; however, if I'm not mistaken, the NDK toolchain already does that.The text was updated successfully, but these errors were encountered: