Seems in compose 1.7 ui-graphics now depends on gr...
# compose
t
Seems in compose 1.7 ui-graphics now depends on graphic-path that includes huge .so files. Any plans to try to reduce the sizes if they are mandatory now? 340K for ARMV8 is huge given the small code. (No log link, MinSizeRel) ?
r
The .so shouldn't be so big indeed. I'll look into this, thanks for raising this problem
t
Thanks from a French compatriot 🙂
r
Did you try a release build btw? AGP should do pretty aggressive symbols removal
t
It is on release builds, I carefully check aab size in CI.
r
Thanks
t
Seems there's a very huge .text in the .so I suppose it's built with a recent NDK?
There was a lot of size regressions after 22.
https://github.com/android/ndk/issues/1402 Maybe your example will give them enough data to report to upper project.
r
This reminds me of how much I dislike the C++ stdlib
t
not linking with log, tweaking -Os or forcing MinSizeRel that is not the default should already help a lot, but yes I hate the very little control we have 🙂
r
Based on what I'm reading in the bug reports it doesn't seem -Os will help that much
t
Not for that bug no, but I'm not sure this is the main or the only issue here, just pointing that issue due to the big .text, but there's maybe room to gain on the rest too.
r
But yeah liblog shouldn't be linked in release
t
Yes I've seen I use nearly the same.
r
I'll fix that
And this library can probably not use libc++ at all
t
Well I did not dig that down I'll leave you the fun 😛
r
alright, I shaved off 150 KiB
doing more would require ditching the stdlib entirely it seems
And another 10 KiB
Hmm seems I’m down to 14 KiB total
t
Wow, nice change indeed. Seeing the PR the last iteration is just about removing stdlib something I can't do. Do you have some details about what you did for the first 150k in case there's some trickery I can reuse?
r
Yes. The first 150 KiB were won by doing something I should have done in the first place for safety: marking all symbols but JNI_OnLoad as local so they can be removed by the stripping step
I saved another 10 KiB by ditching call_once and std_vector. I was left with only one call to "new" as an stdlib non-header-only call and that's enough to bring exceptions and libunwind 😕
Actually just linking libstdc++ seems enough. I guess static initializers are to blame?
t
Thanks a lot, I missed the already merged parts, will look them in details. And thanks for the work on that .so really appreciated.