Tiny Core Extensions > TCE Talk

upx for large executables?

(1/7) > >>

GNUser:
neonix mentioned compressing with upx -9 in a different thread. I decided to investigate.

The largest extension on my system is brave-browser.tcz at 180 MiB.

If I unsquash brave-browser.tcz, compress just the main brave executable using upx -9, and recreate brave-browser.tcz, size of the extension drops to 152 MiB. I'm testing the shrunken extension now and it's working fine. Importantly, upx.tcz does not need to be loaded for the shrunken brave-browser.tcz to work.

Should I be using the upx (or similar) compression tool to reduce the size of the large extensions that I maintain (e.g., brave-browser.tcz)? Are there any downsides? I'm very interested in hearing the opinion of the TCL developers on this.

GNUser:
In the real world there's no such thing as a free lunch, so there must be a downside somewhere...

hiro:
generally, most higher compression methods also take much longer to decompress, especially when the implementation isn't multithreaded...
personally i don't like to go harder than lz4. this algorithm is efficient enough that i don't waste too many cpu cycles, but it compresses most stuff well enough for my needs.

CardealRusso:
Perhaps it might be allowed to change the block size, maybe even the compression to zstd, for specific extensions that would benefit from this.

Brave-broser with 64kb (default is 4kb) gets 155MB.

GNUser:
Hi hiro. Decompression overhead is a good point. I saw your post in the other thread. You're right--having upx inside a gzip-compressed squashfs sounds overcomplicated.

It seems best compression algorithm for tcz has been discussed at length over the years, including in the "Into the Core" book (chapter 18). I'm sorry for beating on this dead horse some more ;D

Hi CardealRusso. Tweaking block size has been discussed before but not pursued due to added complexity (keeping track of which block size to use on which architecture).

I'm going to continue to keep it simple with the extensions that I create and avoid being too clever.

Navigation

[0] Message Index

[#] Next page

Go to full version