ZipPackagePart should allow to not use in memory stream, when compression is off #37810
Labels
area-System.IO.Compression
backlog-cleanup-candidate
An inactive issue that has been marked for automated closure.
no-recent-activity
tenet-performance
Performance related issue
Milestone
Description
ZipPackagePart
is a part ofSystem.IO.Packaging
assembly. That class internally useZipWrapperStream
, to read and write intozip
, but inside this classMemoryStream
is ussed, but when compressing is turned off (CompressionOption.NotCompressed
), then such a stream is waisting of memory resources. That's very annoying when creating XLS files byDocumentFormat.OpenXml
in .NET Core (the same code at .NET Framework work as expected, and not create memory peak).E.g.
At .NET Framework to create XLS (so create xml's in zip file) it's take ~71 MB of memory at ~1 sek peak and
Using .NET Core 3.1 the same code will required ~666 MB of memory
Configuration
For .NET Core
.Net Core 3.1 (Runtime: 3.1.5; SDK: 3.1.301)
System.IO.Packaging (4.7.0)
DocumentFormat.OpenXml (2.11.0)
For .NET Framework
.NET Framework 4.6.1
DocumentFormat.OpenXml (2.5.0)
WindowsBase (4.0.0.0)
The text was updated successfully, but these errors were encountered: