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

Add support for compressing scriptlets bodies #6

Open
cipriancraciun opened this issue Apr 20, 2020 · 1 comment
Open

Add support for compressing scriptlets bodies #6

cipriancraciun opened this issue Apr 20, 2020 · 1 comment
Assignees

Comments

@cipriancraciun
Copy link
Member

At the moment compiled scriptlets libraries are stored in CDB with the body of the scriptlets uncompressed. (Also for the SSH feature they are also transmitted over the network without compression.)

In some cases, where the scriptlet body is above a certain threshold (say 4 KiB), it would be useful to use a quick compression mechanism such as zstd.

(However the usage of a compression library shouldn't add any dynamic libraries to the executable.)

@cipriancraciun cipriancraciun self-assigned this May 20, 2020
@cipriancraciun
Copy link
Member Author

Quick experimentation with gzip based compression yields around 50% compression at almost negligible performance impact. (I.e. a 40 MiB CDB library is compressed to around 24 MiB.)

However, in this experiment compression is applied for each individual value larger than 1 KiB, which means that the compression is not very efficient. (Compressing the whole 40 MiB file with gzip --fast yields ~6.4 MiB; but this wouldn't be applicable in our case...)

Given that this optimization is worth only for large libraries (the 40 MiB test library has ~16K snippets), I think it's safe to postpone this feature.

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

No branches or pull requests

1 participant