-
Notifications
You must be signed in to change notification settings - Fork 203
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
perf(build): Reduce gzip compression level in packaging build context #2400
base: master
Are you sure you want to change the base?
Conversation
- By default, tarfile library do gzip compression at 9 level - Anything above 5 or 6 can take significant resource and time - Based on tests, result of compression of 10 frappe apps around 430MB - With compression level 5, it takes ~8.5s and compressed file size 239MB - With compress level 9, it takes ~13.5s and compressed file size 235MB So, we are not getting too much benefit from using compression level 9
Usually in macos, we have different uid/gid than any linux system So, in development, it was causing issue. That's why the permission modification was added - frappe#1925 But, in prod it's not required. So, we can just modify permission, when developer mode is enabled
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2400 +/- ##
==========================================
- Coverage 38.33% 38.32% -0.01%
==========================================
Files 378 378
Lines 29543 29545 +2
==========================================
Hits 11324 11324
- Misses 18219 18221 +2 ☔ View full report in Codecov by Sentry. |
@tanmoysrt you might wanna add all existing violations to cspell whitelist in one shot, else it will become a continuous annoyance and won't help much. |
Added those words in whitelist. |
By default, tarfile library in python do gzip compression at level 9 (ref).
tar
orgzip
cli use compress level 6 by default (ref).Anything above 5 or 6 compression level can take significant resource and time.
Locally, I have cloned 10 frappe apps (430MB) to compress with different gzip level using tarfile.
Other benchmarks - https://stephane.lesimple.fr/blog/lzop-vs-compress-vs-gzip-vs-bzip2-vs-lzma-vs-lzma2xz-benchmark-reloaded/