-
-
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
Improve Search Performance #4239
Comments
It appears that the problem is that we parse the whole json. Maybe we can try to switch this to an approach where we only parse until we find the |
Yes! Please make a PR when you can. |
I was annoyed by this myself, so I've just put some effort in writing a fix for this. Will publish a PR soon. |
I managed to reduce search time by almost 99% ╭─sb@tealc ~
╰─$ time scoop search lazygit
Results from local buckets...
Name Version Source Binaries
---- ------- ------ --------
lazygit 0.38.2 extras
00:00:18.2134557
╭─sb@tealc ~
╰─$ time scoop search lazygit --offline
Results from cached list...
Name Version Source Binaries
---- ------- ------ --------
lazygit 0.38.2 extras lazygit.exe
00:00:00.1915792 For my use case this really is enough. I do not know if this is a valid approach for any of you, i just wanted to share the idea. Cheers |
Awesome idea @cigh033 Sounds like something worth adding, but not invoke by default. |
@cigh033 generating a cache file would indeed make subsequent searches faster, but the initial invokation would need the same, if not more amount of time as the original search command right? and wouldn't the cache file need to be updated after certain intervals too? |
Originally posted by @mathijshenquet in #5615 (comment)
Historically, manifests were also present in the root directory. However most buckets now follow the convention of having a |
Just an advice: maybe we can use sqlite or moreover we can use a git like sql databse like https://github.com/dolthub/dolt |
https://github.com/shilangyu/scoop-search has changed my experience with scoop, the slow search has always been one of my pain points as a user.
I'd be willing to PR improvement to the search engine to incorporate the lessons learnd here if there is interest.
The text was updated successfully, but these errors were encountered: