Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZipPackagePart should allow to not use in memory stream, when compression is off #37810

Open
KondzioSSJ4 opened this issue Jun 12, 2020 · 1 comment
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

Comments

@KondzioSSJ4
Copy link

KondzioSSJ4 commented Jun 12, 2020

Description

ZipPackagePart is a part of System.IO.Packaging assembly. That class internally use ZipWrapperStream, to read and write into zip, but inside this class MemoryStream 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 by DocumentFormat.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)

@KondzioSSJ4 KondzioSSJ4 added the tenet-performance Performance related issue label Jun 12, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.IO.Compression untriaged New issue has not been triaged by the area owner labels Jun 12, 2020
@carlossanlop carlossanlop added this to the Future milestone Jun 29, 2020
@carlossanlop carlossanlop removed the untriaged New issue has not been triaged by the area owner label Jul 8, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants