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

Another attempt to improve the search performance #5644

Merged
merged 18 commits into from
Oct 3, 2023

Conversation

r15ch13
Copy link
Member

@r15ch13 r15ch13 commented Sep 13, 2023

Description

This is another attempt to improve the local search performance.

  • Not using the manifest() function
  • Use only one loop over $apps
  • Push results to $list directly
  • Use [System.IO.File]::ReadAllText() instead of Get-Content

Motivation and Context

Closes #4239

Relates to #4818

How Has This Been Tested?

Measure-Command { scoop search telegram }
Measure-Command { .\bin\scoop.ps1 search telegram }

image

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.

@r15ch13
Copy link
Member Author

r15ch13 commented Sep 13, 2023

See conversation in #5324
Had to recreate the PR because I messed up my branch ...

@burgr033
Copy link

would love to see this merged as this drastically reduces search time 👍

@rashil2000 rashil2000 mentioned this pull request Oct 2, 2023
3 tasks
rashil2000
rashil2000 previously approved these changes Oct 2, 2023
@rashil2000
Copy link
Member

@r15ch13 LGTM - just one small hitch - this is not a bug fix but a performance improvement (in the Changelog)

@rashil2000 rashil2000 merged commit b3c05e7 into develop Oct 3, 2023
2 checks passed
@rashil2000 rashil2000 deleted the another-search-improvement branch October 3, 2023 14:05
CrendKing pushed a commit to CrendKing/Scoop that referenced this pull request Oct 3, 2023
…ler#5644)

* perf(search): improve local search performance

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Update libexec/scoop-search.ps1

Co-authored-by: Hsiao-nan Cheung <[email protected]>

* Added [JsonDocument]::Parse for testing

* Fix array length check

* Used wrong function

* Add fallback function for PowerShell 5

* Check for System.Text.Json in Assemblies instead

* Show help output

* Revert "Show help output"

This reverts commit d3d6b01.

* Update CHANGELOG.md

---------

Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Rashil Gandhi <[email protected]>
@bytebone
Copy link

bytebone commented Oct 9, 2023

With this now merged, is there an ETA when this will arrive in main? I notice that there hasn't been an update for nearly a year.
Alternatively, how can I build / use from the develop branch? I really want to get my hands on this specific change.

@rashil2000
Copy link
Member

rashil2000 commented Oct 9, 2023

You can use the develop branch using this code:

scoop config SCOOP_BRANCH develop
scoop update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants