Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Is it normal that APK without AOT has ~30mb size and generated APK with AOT + LLVM size is ~80 mb?
I use multidex - my app uses a lot of external libraries google play, facebook sdk and so on..
> Is it normal that APK without AOT has ~30mb size and generated APK with AOT +
> LLVM size is ~80 mb?
At present, we don't have any IL stripping support, for enabling AOT is purely *additive* to previous .apk sizes, meaning your existing 30MB app w/o AOT will continue to be *at least* 30MB with AOT enabled. That 30MB is your floor.
Next, for *each* ABI that your app supports -- armeabi-v7a, x86, etc. -- every assembly that your app contains is AOT'd, and AOT'ing an assembly frequently results in a *larger* file than the source assembly. So you're *at least doubling* the "instruction" size (IL + machine code), and that's if your .apk only supports a single ABI.
Additionally, when it comes to generics AOT will need to emit expansions for every known instantiation, which can *really* cause machine code size to bloat.
AOT is for performance (reduced JIT times), *not* for app sizes.