godot-sqlite icon indicating copy to clipboard operation
godot-sqlite copied to clipboard

Reduce binary size

Open boruok opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

Is here any way to reduce binary size? for example, stripped sqlite binary size is 1.6mb compared to plugins x11 4.6mb. Describe the solution you'd like

It might be useful on platforms where app size is important.

Describe alternatives you've considered

(https://www.sqlite.org/footprint.html) Additional context

N/A

boruok avatar Mar 28 '22 15:03 boruok

Hi @boruok, The larger binary size is due to the GDNative interface being part of the binary vs. compiling a binary without any wrapper.

I don't really know if it is possible to reduce the binary size on my end? There might be some compiler flags that succeed in pushing down the size, but I'm not a compiler flag expert.

Out of curiosity, do you have a target application or a personal project that requires this reduction?

2shady4u avatar Mar 30 '22 16:03 2shady4u

@2shady4u this personal (commercial) project for mobile devices. So, i've managed to quicktest linux build, decreased libgdsqlite.so size from 4.6mb to 3.7mb.

  1. change CCFLAGS from -O3 to -Os
  2. strip generated binary

I wonder if there is an option to disable unwanted bindings on godot-cpp side...

boruok avatar Mar 31 '22 03:03 boruok