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

perf(scoop-update): Check for running process before wasting time on download #5799

Conversation

davidlwatsonjr
Copy link
Contributor

@davidlwatsonjr davidlwatsonjr commented Feb 6, 2024

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:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

@davidlwatsonjr davidlwatsonjr force-pushed the test-running-process-before-download branch from b6cbf0a to 685f5d6 Compare February 6, 2024 19:19
@davidlwatsonjr davidlwatsonjr changed the base branch from master to develop February 6, 2024 19:20
@davidlwatsonjr davidlwatsonjr changed the title Check for running process before wasting time on download [perf] Check for running process before wasting time on download Feb 6, 2024
@chawyehsu chawyehsu changed the title [perf] Check for running process before wasting time on download perf(scoop-update): Check for running process before wasting time on download Mar 27, 2024
chawyehsu
chawyehsu previously approved these changes Mar 27, 2024
@chawyehsu chawyehsu requested a review from niheaven March 27, 2024 10:45
niheaven
niheaven previously approved these changes Mar 27, 2024
@niheaven niheaven merged commit 9ef03c2 into ScoopInstaller:develop Apr 1, 2024
2 checks passed
@SkeathyTomas
Copy link

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?

@chawyehsu
Copy link
Member

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 scoop download. #5908

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