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.
This commit is contained in:
Vukašin Vojinović 2025-10-05 20:00:58 +02:00 committed by Michael Murphy
parent c42e37b2dd
commit d788fe2421

View file

@ -245,7 +245,6 @@ fn zip_extract<R: io::Read + io::Seek, P: AsRef<Path>>(
controller.set_progress(total_progress);
}
}
outfile.sync_all()?;
#[cfg(unix)]
{
// Check for real permissions, which we'll set in a second pass