/plushcap/analysis/algolia/algolia-engineering-android-ndk-how-to-reduce-libs-size

Android NDK: How to Reduce Binaries Size - The Algolia Blog

What's this blog post about?

The text discusses the process of reducing binary size optimization for Android applications. It starts by mentioning that initially, binary size was not a major concern when developing Algolia for Android. However, upon learning about its impact on integration with AVelov Android Application, they decided to address this issue. They managed to reduce the binary size from 850KB to 307KB by implementing several strategies such as disabling C++ exceptions and RTTI, avoiding iostreams, using gcc's visibility feature, enabling function section optimization, removing duplicated code with linker option --icf=safe, changing default compilation flags of the toolchain, and limiting the number of supported architectures. The final result was a 64% gain in size reduction from the initial 850KB.

Company
Algolia

Date published
April 6, 2015

Author(s)
Julien Lemoine

Word count
1021

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.