chocolatey / chocolatey/ChocolateyGUI
When searching for packages, results are slow to appear
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 271
- Avg merge
- 4d 13h
- Merged PRs (30d)
- 1
Description
Loading search results take a very long time. In fact, it's unusably slow, and significantly slower than Synaptic and Mint package managers and apt. The only reason I installed as many programs with it as I did was so I could thoroughly test it out, but it took hours (in fact, over a day IIRC) to install the ~120 programs I did. Here's my findings and thoughts on the matter:
- I ran some tests, timing how long it took. The first search I performed, after not using Chocolately for a couple weeks or so, took 8:53 (8 minutes, 53 seconds). Looking at the console output, it was "fetching packages" and going through the list of my installed programs. I'm not sure if all ~120 were listed, but it went through quite a few. AFAICT, it found 6 updates. Nine minutes is an awfully long time for that. I'm not sure if it actually downloaded the updates, which would at least help explain the long time, but if it did, then that's part of the problem, since it should do that in the background, not make me sit there waiting.
- Speaking of having to sit and wait, it shouldn't be going through my installed programs when I'm trying to perform a search. It should do what I'm asking it to do at the time: look for programs, not work on the ones I have. And it certainly shouldn't recheck them every, single time I do a search or go to the next or previous page of results.
- After that, I did another search. This time, the console output showed more or less the same thing, but it "only" took 1:18. Another test took 1:54. It then said there was an update for Chocolately, so I updated it, restarted it, and did another "search," (see next point for why I quoted this) this time taking 1:07 (I'm not sure if it was faster this time due to the update or because it had already got a lot of the stuff that required more time out of the way, but that's still far too long).
- Another issue, which is mainly an issue because of how long searches take, is that when clicking "chocolatey" in the left pane (below "This PC"), it automatically performs a search. So some of the "searches" I was doing and timing, and far too many "searches" I did as I was installing software and testing things out, were simply due to this. It shouldn't automatically start searching when you click "chocolatey," especially if it's going to be so slow. It should just load a blank screen and let you search for what you actually want right away. If anything, have it do the default search the first time and that's it.
- It should also cache results and have back/forward buttons to allow for quickly going back and forth, which would help at least somewhat with the agonizingly slow searching. I realize the cache would have to be time-limited, to avoid installing outdated packages, but even 15-30 minutes would be very helpful, though it could easily cache them for a few days or more and simply fetch updated information for packages as you select them.
- Going to the next/previous page also takes a long time (not quite as long, but still probably half a minute or so). It should pre-load the next page and keep previous pages cached.
As you can see, with an average of ~1:30 per search, considering one search per installed application, plus the forced blank searches, plus having to search for some multiple times, partly due to no back/forward or cache feature, partly due to figuring stuff out as I went, and partly due to other issues, you can figure I wasted probably close to 3.5 hours just waiting in order to install the programs I did. That's prohibitively slow and a very serious problem. I love the idea of Chocolatey, so I really hope this can be resolved.
This is on Win10x64, btw. Also, the search is much faster using the CLI, so it's a GUI-related issue.
Contributor guide
Research direction
No source files or tests are named. Start by reproducing package searches in the GUI on Windows and compare them with the CLI behavior described in the issue. Trace the search, installed-package refresh, automatic initial search, pagination, and caching paths. Done means searches and page changes no longer incur unnecessary long waits and the requested caching or background-refresh behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100