AndroidAudioMods / ViPERFX_RE

Reverse Engineering of ViPER4Android FX
256 stars 21 forks source link

Optimize shipping binaries #17

Closed arter97 closed 1 year ago

arter97 commented 1 year ago

Hi, thanks for this herculean effort.

Never thought something like this would happen :)

I've noticed that the binaries shipped in https://github.com/AndroidAudioMods/ViPER4Android/releases aren't stripped. And by the size, I don't think optimize compiler flag was given either.

Please consider adding something along the lines of -flto -O3: target_compile_options(v4a_re PRIVATE -flto -O3 -DNDEBUG), and strip the binaries before shipping.

The resulting binaries are much smaller and (should be) much faster. In my case, final arm64 binary is 436K in size.

Thanks!

iscle commented 1 year ago

Hey! Nice to see you around here :)

The reason they're not optimized or stripped at the moment is because they are the same ones I use to debug. However, thinking about it, it might make sense to do both and see how the library behaves that way (and maybe it will point us to any issues, mainly buffer overflows which happened in the past).

I'll close the issue after making the change.

Thanks!

arter97 commented 1 year ago

From a short playing around with it, seems to work fine with -flto and -O3.

Although, I'm only using bass and clarity, so there's that.

iscle commented 1 year ago

Done! The new binaries will be created by the github workflow. I'll release a new version of the app and magisk module in the following days, with added Android Auto compatibility.