Describe the bug
Iterating over 1.5GB ZIP archive (with 947319 small files) causes the app to consume almost 512MB of memory on my machine. Listing files in ZIP with unzip -l on the other side takes 1.6M.
To Reproduce
Steps to reproduce the behavior:
- Go to https://www.sec.gov/search-filings/edgar-application-programming-interfaces
- Download submissions.zip under "Bulk Data"
- Run program:
let reader = std::fs::File::open("submissions.zip").unwrap();
let mut zip = ZipArchive::new(reader).unwrap()
let num_files = zip.len();
for i in 0..num_files {
let file = zip.by_index(i).unwrap();
println!("Read file: {}", file.name());
}
Expected behavior
Expected that memory footprint is somewhat small.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
Describe the bug
Iterating over 1.5GB ZIP archive (with 947319 small files) causes the app to consume almost 512MB of memory on my machine. Listing files in ZIP with
unzip -lon the other side takes 1.6M.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expected that memory footprint is somewhat small.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.