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

[Feature] Release apps as .tar.zstd instead of/in addition to .tar.gz #19024

Closed
KopfKrieg opened this issue Jan 20, 2020 · 4 comments
Closed
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement

Comments

@KopfKrieg
Copy link

Is your feature request related to a problem? Please describe.
It's more or less related to a problem. Recently Nextcloud 18 got released including the community document server app. Unfortunately, the app is already 292MB in size, and since the default timeout for downloads is 30 seconds, you'll need at least a server with a ~100MBit/s connection, otherwise the download will fail. Many people host Nextcloud at home or on small servers (vps), so this is already a problem.

And even if you manage to download the nearly 300MB, the installation will take ages, since unpacking .tar.gz is rather slow. Also, creating the packages is slow too because gzip just doesn't perform well.

Describe the solution you'd like
Replace the gzip compression with zstd (or maybe offer both? Zstd for, e.g., NC19 and up, and gzip for NC18 and older). There's also a php package available. This won't solve the initial problem entirely, but will help in the future since apps usually tend to grow even further in size.

Describe alternatives you've considered
I've also take a look at other compression algorithms including lzo, lz4 and xz, but zstd seems to be the best so far. Zstd offers great performance both in compression and decompression while maintaining a better compression ratio than most other algorithms.

The document server app could be reduced from 292MB to 280MB with zstd's default compression setting (3), or even to 225MB (-23% in size!) with a compression setting of 19. This would not only speed up the download by nearly a quarter, but will also speed up decompression (on my system decompression time got reduced by 33%).

Additional context
Note: There's also another issue open about switching the compression algorithm, but it's meant for Nextcloud itself and not the apps/app store (even though I'd also like to be able to download the source code as .tar.zstd).

@KopfKrieg KopfKrieg added 0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement labels Jan 20, 2020
@kesselb
Copy link
Contributor

kesselb commented Jan 21, 2020

If the zstd extension is not available we need to fallback to another format or someone has to write a pure php zstd extractor.

I see your point about picking a more efficient compression but zstd is not a solution until available for most users.

@kesselb
Copy link
Contributor

kesselb commented Jan 21, 2020

Hmm. PHP does not support tar natively. Nextcloud is using a pure php implementation to extract the archive. Probably the native PHP zip extension performs better in terms of decompression.

@Glandos
Copy link
Contributor

Glandos commented Aug 20, 2020

For compatibility and bandwidth, it is also possible to use XZ. This compression format is widely available, and the compression ratio is higher than zstd, albeit the decompression time is a bit higher than gzip.

@szaimen
Copy link
Contributor

szaimen commented Jun 9, 2021

I think the download time limits were raised to make them suceed more often. You can also execute the install commands via OCC where no limits are in place. So I don't think that this feature request is worth the effort.

@szaimen szaimen closed this as completed Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap enhancement
Projects
None yet
Development

No branches or pull requests

4 participants