Open MathiasMagnus opened 7 years ago
I have the same problem. When it will be fixed?
will this ever get fixed?
Also interested by the resolution of this issue
It is very slow. It needs 10 minutes to extract 200MB. Any workaround? Maybe an option that could improve the extraction performance?
My intent is after PS7 GA to have resources applied to this module and convert it to C# using some OSS libs that will solve a number of outstanding issues.
By the way, if anybody has ideas on a good archive engine that potentially can be used - feel free to post your suggestions here...
Also have the same issue. It's unbelievably slow.
You can get some performance if you do not show progress when Expanding.
Setting $progressPreference = 'SilentlyContinue'
before the expand
I found 2 ways to improve unzip speeds.
First, exclude the directory from Windows Defender. It makes things really slow. I'm extracting a 50mb file and doing this changed it from taking about 4 minutes to taking 26 seconds. You must decide if you're OK with the security risk.
Add-MpPreference -ExclusionPath C:\installers
Second, use this .NET class to extract the zip. This changed it from taking 26 seconds down to 12 seconds.
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\installers\app.zip", "C:\installers\app")
I am having the same issues, same zip file, used to take 3-4 minutes. it is now taking over like 2 hours, randomly, after yesterday 07 Feb 2022, azure outage issues. Was working perfectly before no issues.
I actually cannot understand why Microsoft is not fixing this?
@mkarg This is on Microsoft's radar.
Love to see this issue being addressed
Blog post on Archive module 2.0 and the Github project tracking progress, with this very issue in it.
Compress-Archive
is also very slow even with -CompressionLevel NoCompression
, much slower than 7zip
Add-Type -Assembly "System.IO.Compression.Filesystem" [System.IO.Compression.ZipFile]::ExtractToDirectory("C:\installers\app.zip", "C:\installers\app")
@raymondbutcher This! For a 120MB file this improves extraction times from 1min. 20sec. to just 9 sec.
That example by @s-geiger-si is sooo much faster it is just crazy...
@mkarg This is on Microsoft's radar.
Nice. And when will Microsoft fix it? Two years are gone.
Agree with @mkarg. @SydneyhSmith, @ayousuf23 any clarification on when to expext this?
Allow me to copy the contents of an issue posted under PowerShell/PowerShell.
Expand-Archive performance is 6X away from 7zip. In it's current state I would say it barely passes automation perf level. In an interactive shell, one would rarely resort to it if there is an alternative that is 6X faster.
Steps to reproduce
Download some large archive (qt-everywhere-opensource-src-5.9.0-alpha.zip was my use case) and unzip.
Expected behavior
Something like this:
Actual behavior
Environment data