Skip to content

System.IO.Compression ZipArchive bad performance over network #31460

Closed
@KrabatTilt

Description

@KrabatTilt

I am working with a file format that contains a ZipArchive inside a Package. To access the data following code is applied:

var outer = Package.Open(filename, FileMode.Open, FileAccess.Read, FileShare.Read);
var data = outer.GetPart(new Uri("/Image.data", UriKind.Relative));
var inner = new ZipArchive(data.GetStream(FileMode.Open, FileAccess.Read), ZipArchiveMode.Read, true);

Running that code targetting netFramewok472 takes about 0.5 sec to open a 400MB file on a SMB network share over a 16Mbit network connection. Memory consumption is 42MB.

Running same code targetting netCoreApp30 on same file, took 290 sec ending up with 800MB memory consumtion.

This is a huge performance drop in access time and memory consumtion. Any suggestions where this comes from and how to workaround?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.IO.CompressionquestionAnswer questions and provide assistance, not an issue with source code or documentation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions