This also breaks nuget for packages with lots of files. It takes huge amount of time to install a package with many files.
This happens (usual callstack order, parent at the bottom):
zipsharp.UnzipArchive.GetCompressionLevel(file inside package) <--- this (and everything above) is called for every file in the package. This seems to cause a reread of the whole archive - for every file inside it.
Basically UnzipArchive wasn't made for archives with many files.
How to reproduce:
-create a nupkg with many files
-run this code:
var package = Package.Open("broken.nupkg");
var rels = package.GetRelationshipsByType("anonymous");
I've done this, just clone this repo
Runs fine under MS .NET
Sits using CPU and IO-reading when used with mono (tried windows, linux/x64 and linux/arm)
Proposed solution: UnzipArchive should read the archive once and obtain information about the files. Not just file names, but compression info too.