ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.29k stars 1.41k forks source link

scoop search very slowly #4491

Closed diklios5768 closed 2 years ago

diklios5768 commented 3 years ago

Updated scoop few days ago. Now scoop search apps very slowly, not only local but remote, always take long time to finished search, need 10 minutes or longer. I don't know why.

niheaven commented 3 years ago

Scoop will try to search apps online, and may you check your network? The infrastructure doesn't change for a long time.

Valinor commented 3 years ago

10 minutes is not "normal". Can you try to "git pull" manually to see if it's your network, pull, or other things. How many application do you have? Did you check you disk? (use tools to monitor usage (network, disk, memory) when you update scoop (see if it's not your antivirus). Maybe an antivirus update recently?

tech189 commented 3 years ago

You could also try scoop-search - an alternative search program that replaces the slow built-in scoop search.

I just tried it out on scoop search scoop-search which took 42 seconds with the default search and less than a second using scoop-search!

Valinor commented 3 years ago

@tech189 : Even 42 seconds seem very long for me :

image

What is your antivirus?

zhoujin7 commented 3 years ago

https://github.com/zhoujin7/scoop-search/blob/master/scoopSearch.ps1

Valinor commented 3 years ago

@zhoujin7 I understand your answer. Thanks to point it and show alternative.

This is not the problem here. It's the same as "I have a bug with windows => Use Linux". We should understand the root cause. And.... Nobody answer me about antivirus or monitoring data....

tech189 commented 3 years ago

I'm using the built in Microsoft/Windows Defender, so no custom antivirus and no exceptions on the scoop folder. I have 4 buckets, main extras java and my own. Oh and this is running on an SSD that typically has good performance and opens programs pretty quickly.

diklios5768 commented 3 years ago

Thanks. But this situation is strange. It is not a problem of network. I checked my network, use scoop to install or update, it done well. Only search has problem. e.g. I search python use scoop search python, it will search in local bucket firstly, and this will take exceptionally long time, at least 5 minutes. It will slowly show many results, it may take 10 minutes or longer time to show them all. I have closed Windows Defender, had no antivirus, and used SSD. Although I have many buckets, but just two or three weeks ago still search fast. I don't know if it caused by scoop or some bucket. I had WSL2 and apt also work well.

diklios5768 commented 3 years ago

10 minutes is not "normal". Can you try to "git pull" manually to see if it's your network, pull, or other things. How many application do you have? Did you check you disk? (use tools to monitor usage (network, disk, memory) when you update scoop (see if it's not your antivirus). Maybe an antivirus update recently?

Network has no problem and use SDD. It worked well before but recently have problem

diklios5768 commented 3 years ago

Thanks. But this situation is strange. It is not a problem of network. I checked my network, use scoop to install or update, it done well. Only search has problem. e.g. I search python use scoop search python, it will search in local bucket firstly, and this will take exceptionally long time, at least 5 minutes. It will slowly show many results, it may take 10 minutes or longer time to show them all. I have closed Windows Defender, had no antivirus, and used SSD. Although I have many buckets, but just two or three weeks ago still search fast. I don't know if it caused by scoop or some bucket. I had WSL2 and apt also work well.

use scoop-search: image

use default scoop search command: image

Valinor commented 3 years ago

O_o 11 minutes ! You are very patient :)

image

You have scoopet and user. Try to disable all bucket except main and extras to see the impact.

You can clean some scoop info :

scoop cache rm *
scoop cleanup *
scoop checkup

and show here the result of scoop checkup.

Alls my buckets contains ~10 000 files

11 minutes, it is 15 files per seconds.

Also try : Measure-Command { Get-ChildItem -Path "*.json" -Recurse | Select-String -Pattern 'python' } | Select -ExpandProperty TotalSeconds

diklios5768 commented 3 years ago

My bucket has 16000+ files: image

Run Measure-Command { Get-ChildItem -Path "*.json" -Recurse | Select-String -Pattern 'python' } | Select -ExpandProperty TotalSeconds in scoop/buckets: image 3 seconds! So fast! Looks good!!!

After run scoop checkup: image

First problem fixed by run scoop bucket rm 'extras'; scoop bucket add 'extras': change nothing image

Then run sudo Set-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 image

and change nothing: image

At last, I finished all problem and it still change nothing, it still cost 12 minutes. image

I clear all commands in PowerShell $profile, change nothing.

Then I use cmd.exe to run scoop search python, It run faster. It finished before fixed all scoop checkup problems and clear all commands in PowerShell $profile. But still cost about 5mintues.

And my SSD and system runs well when run scoop search python: image

Now I doubt it caused by Ash258 scoop-core, it searches many contents and give more results. image

But why not happen weeks ago. I can't remember if I add some large buckets. So, I'm not sure again. 。゜゜(´O`) ゜゜。

diklios5768 commented 3 years ago

After disable all buckets but main, extras and nonportable: Now it has 3000+ files: image

Run scoop search python: image

Use scoop-search: image

xianzheTM commented 3 years ago

I just use "Base" & "main" bucket.And I searched anaconda for 20 seconds. Then I added the bucket of apps, which is an aggregate bucket, and it is relatively large. I searched again. It took three minutes this time.

diklios5768 commented 2 years ago

At last use scoop-search tool to replace scoop search. Still don't know why search so slowly.

adamency commented 1 year ago

This is really not a motive for closing "as completed".... No package manager has ever officially told its users to use a 3rd party software to search its own repositories. You should keep this issue open until scoop-search is integrated in scoop or scoop search is fixed.

Michaelzhouisnotwhite commented 1 year ago

I have the same problem...

tech189 commented 12 months ago

@adamency It's okay to keep this closed as we already have an issue for tracking this: https://github.com/ScoopInstaller/Scoop/issues/4239. Please follow that one instead.

adamency commented 11 months ago

@tech189 Alright, thanks for the link.

sebma commented 8 months ago

Hi, It takes ~27 seconds on my system :

PS C:\> ( Measure-Command { scoop search pstube | Out-Host } ).TotalSeconds
WARN  No matches found.
26.7692606
PS C:\>

How can I make it faster ?

sebma commented 8 months ago

After a :

scoop cache rm *
scoop cleanup *

It takes ~26 seconds :

PS C:\> ( Measure-Command { scoop search pstube | Out-Host } ).TotalSeconds
WARN  No matches found.
25.6554159
PS C:\>
tadghh commented 2 months ago

Installing aria2 solves this

scoop install aria2;
scoop config aria2-warning-enabled false
sebma commented 2 months ago

@tadghh After installing aria2, the search takes 17s.

tadghh commented 2 months ago

@sebma

Change some of the config ops

https://github.com/ScoopInstaller/Scoop?tab=readme-ov-file#multi-connection-downloads-with-aria2

scoop config aria2-retry-wait 1;
 scoop config aria2-max-connection-per-server 20;
 scoop config aria2-min-split-size 1M;
 scoop config aria2-options --max-concurrent-downloads=10;

Using scoop search pstube 30s -> new settings ~5s Random 1 off search after new settings scoop search shit ~5s Not a real benchmark but it feels faster

sebma commented 2 months ago

@tadghh It now takes 16s

My guess is that maybe my connection is crap.

tadghh commented 2 months ago

@sebma yup no clue. Its currently faster to use the scoop.sh site to look for packages. Needing to open the browser and search + navigate to a whole page just to look for a package is so clunky.