Open BiatuAutMiahn opened 4 years ago
The easiest way is to not package module sources, just bytecode. You can also cut down on the extensions being distributed, as some of the library dependencies are a few MB.
Running strip
on the resulting executable should also help. (This would be a good feature to add.) Although running strip
removes debug symbols and makes crashes harder to dissect. Tradeoffs.
right, ty
Ok I need to add, Im using Win10 as my platform with x86_64-pc-windows-msvc, nightly
On Windows, debug symbols are not included in the binary. So the best way to cut down binary size would be to not include unused extensions, module sources, and modules entirely.
Do you find PyOxidizer's binaries to be much larger than a regular Python install? (Because they should be roughly the same size.)
They are, however with upx I can get the binary down to 7mb
I noticed that when I packaged my binary created with pyoxidizer inside a deb or rpm, the package is about a third of the size of the binary (73Mb to 25Mb), which means it must be pretty compressible. Not sure if it makes sense to have an option to compress inside the binary to bring the size down. It is nice that the resulting rpm or deb is moderately sized.
Can we do anything to optimize the size of the resulting exe?