From d788fe2421df738c0535cffc872522722fe329da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Vojinovi=C4=87?= <150025636+git-f0x@users.noreply.github.com> Date: Sun, 5 Oct 2025 20:00:58 +0200 Subject: [PATCH] perf(zip): don't call `sync_all()` on every file Calling it on every file massively slows down extraction of zip archives containing a lot of files. Yields a ~60x time reduction for extracting a zipped folder containing 10,000 empty txt files. From what I can find, Ark also doesn't seem to do this, and instead relies on the OS to handle it. --- src/archive.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/archive.rs b/src/archive.rs index a0b30b9..9bd3b32 100644 --- a/src/archive.rs +++ b/src/archive.rs @@ -245,7 +245,6 @@ fn zip_extract>( controller.set_progress(total_progress); } } - outfile.sync_all()?; #[cfg(unix)] { // Check for real permissions, which we'll set in a second pass