fix(bundler/rpm): Reduce compression level to gzip/6 (#9840)

This commit is contained in:
Fabian-Lars 2024-05-21 18:03:47 +02:00 committed by GitHub
parent 5d20530c91
commit 781d74799a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
tauri-bundler: patch:enhance
---
Reduced the compression level for rpm bundles from 9 (max) to 6. This has almost no effect on file size but should reduce build time by roughly 25%.

View File

@ -47,7 +47,9 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<PathBuf>> {
let license = settings.license().unwrap_or_default();
let mut builder = rpm::PackageBuilder::new(name, version, &license, arch, summary)
.epoch(epoch)
.release(release);
.release(release)
// This matches .deb compression. On a 240MB source binary the bundle will be 100KB larger than rpm's default while reducing build times by ~25%.
.compression(rpm::CompressionWithLevel::Gzip(6));
if let Some(description) = settings.long_description() {
builder = builder.description(description.trim())