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

Use 7zip when available for zip file (more fast) #3460

Merged
merged 2 commits into from
Sep 1, 2019
Merged

Use 7zip when available for zip file (more fast) #3460

merged 2 commits into from
Sep 1, 2019

Conversation

edgardmessias
Copy link
Contributor

Example with vim, reduce the time of 67 seconds to 23 seconds

Command for test:

Measure-Command { .\bin\scoop.ps1 update vim -f }

#output
vim: 8.1.1330 -> 8.1.1330
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
Updating one outdated app:
Updating 'vim' (8.1.1330 -> 8.1.1330)
Downloading new version
Loading gvim_8.1.1330_x64.zip from cache.
Checking hash of gvim_8.1.1330_x64.zip ... ok.
Uninstalling 'vim' (8.1.1330)
Unlinking ~\scoop\apps\vim\current
Loading gvim_8.1.1330_x64.zip from cache.
Extracting gvim_8.1.1330_x64.zip ... done.
Linking ~\scoop\apps\vim\current => ~\scoop\apps\vim\8.1.1330
Creating shortcut for gVim (gvim.exe)
'vim' (8.1.1330) was installed successfully!

Measure with 7zip:

Days              : 0
Hours             : 0
Minutes           : 0
Seconds           : 23
Milliseconds      : 112
Ticks             : 231125631
TotalDays         : 0,000267506517361111
TotalHours        : 0,00642015641666667
TotalMinutes      : 0,385209385
TotalSeconds      : 23,1125631
TotalMilliseconds : 23112,5631

Measure with powershell 5:

Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 7
Milliseconds      : 113
Ticks             : 671134835
TotalDays         : 0,000776776429398148
TotalHours        : 0,0186426343055556
TotalMinutes      : 1,11855805833333
TotalSeconds      : 67,1134835
TotalMilliseconds : 67113,4835

@r15ch13 r15ch13 changed the base branch from master to develop May 14, 2019 15:18
@niheaven
Copy link
Member

Why not use if...else...? i.e., move extract_fn = "Expand-ZipArchive" to else

@edgardmessias
Copy link
Contributor Author

@niheaven, done

Copy link
Member

@niheaven niheaven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@linsui
Copy link
Contributor

linsui commented Sep 1, 2019

Can this be merged?

@r15ch13 r15ch13 merged commit e37e4ca into ScoopInstaller:develop Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants