-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
perf(scoop-update): Check for running process before wasting time on download #5799
perf(scoop-update): Check for running process before wasting time on download #5799
Conversation
b6cbf0a
to
685f5d6
Compare
4652a2d
to
f9afe24
Compare
I use proxy to update scoop apps. This feather annoys when I update my proxy app for when I quite the app first and I cannot download anything. Previous version downloading first strategy won't waste time on download as it doesn't delete packages. Can it be a config or scroll back? |
There is not much difference in the case of updating your app - You have to close the app eventually to get it updated successfully. You may use |
This PR simply moves the check for an existing running process to BEFORE the download of the new version. This saves time especially on larger application downloads and slower connections.
Description
As stated, I've simply moved the
test_running_process
call to before the download of the application.Motivation and Context
This change was motivated by an instance where I attempted to
scoop update *
and some of the applications were still running. To speed this up, it seemed reasonable to skip the update process for running applications. If and until it's possible to reliably update a running application, this seems a reasonable stop-gap to improve update performance of applications that can be updated.This relates tangentially to #1372 as the update process will at least avoid the pointless download time if the application is running.
How Has This Been Tested?
I ran this locally using
scoop update keepass
while keepass was running. After my change, everything ran as expected and the running process information was shown, bypassing the download step.Checklist:
develop
branch.