Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nice job, but UPX is not good. #21

Open
DeafMan1983 opened this issue Jun 6, 2023 · 2 comments
Open

Nice job, but UPX is not good. #21

DeafMan1983 opened this issue Jun 6, 2023 · 2 comments

Comments

@DeafMan1983
Copy link

Hello everyone,

Nice idea for Aot version. But I don't need upx. But I find funny because single executable requires 2 libraries as *.a for Linux/macOS and *.lib for Windows via directinvoke.

If you use musl-libc Linux like Void-Linux or Alpine then you just add then clang error message and copy whole output of error message and replace "clang" with musl-g++ -static and find -lrt and add -lSkiaSharp -lHarfBuzzSh then strip -S AvaloniaAOT then it looks small executable ca 10 mb under Linux.

@Sewer56
Copy link

Sewer56 commented Jun 14, 2024

Every once in a while I come back to this repo to mess around.

Anyway, I would recommend against using UPX too. Unless you're making a tool that's very, very rarely used so you'd rather save disk space.

The reason being that it hurts startup times. Aside from the obvious decompression, there's also another contributor.
It's actually in fact I/O.

For UPX to work, it must read and decompress the whole binary at once in memory.
Meanwhile a regular, uncompressed binary can use Demand Paging to dynamically load the code on page faults only as it's needed.

In practice the difference in boot times is not likely to be very high, but it exists.

@lixinyang123
Copy link
Owner

Every once in a while I come back to this repo to mess around.

Anyway, I would recommend against using UPX too. Unless you're making a tool that's very, very rarely used so you'd rather save disk space.

The reason being that it hurts startup times. Aside from the obvious decompression, there's also another contributor. It's actually in fact I/O.

For UPX to work, it must read and decompress the whole binary at once in memory. Meanwhile a regular, uncompressed binary can use to dynamically load the code on page faults only as it's needed.Demand Paging

In practice the difference in boot times is not likely to be very high, but it exists.

By default, upx will be disabled 8b4cc5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants