-
-
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
Another attempt to improve the search performance #5324
Another attempt to improve the search performance #5324
Conversation
WIP or Ready for review? |
Some more areas for optimization:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for nested manifests
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Sorry but I found |
@niheaven |
Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Hsiao-nan Cheung <[email protected]>
That's LGTM, and it needs an updated changelog :). |
On multiple repeated runs (i.e. warm cache), EnumerateFiles is almost always twice as fast as Get-ChildItem in my testing. On cold cache, the difference is even more. |
https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsondocument.parse?view=net-7.0 Not available for .NET 4.5 |
Oh, I was searching for |
If we just run |
Out of topic here, the minimal requirements of Scoop are WindowsPowerShell and .Net Framework 4.5 which really lacks some new features of modern PowerShell and .Net. Could this be updated? (To newest PowerShell) |
Alright, what about this one? |
It goes down to around 700ms from 1.3sec by using |
Since |
Too complicated for the JSON parsing function here... And The loop and generic list (this is not needed even, IMO. I've tried to replace all array '@()' to generic list but the time savings is 😭) are enough for |
Added a fallback for when |
I still don't think we need to speed up If this is needed indeed, tweak (or migrate to) the |
The two different searching time are all using this PR's solution? Wow... |
Yes, just ran the same code twice after restarting the PC. |
This reverts commit d3d6b01.
Hello. Whats the status of this? From reading the messages here, it seems to me all painpoints have been agreed upon, no? As someone coming back to Windows from Arch, I find it super painful to have to wait multiple seconds for every search I do, and I'd much appreciate any improvement to the search speed, no matter how big or small. Just wanted to add my two cents - thanks for all the hard work! |
Really excited about this one 🙂 Is it still on the radar? |
Messed up the branch. Created a new PR #5644 |
Description
This is another attempt to improve the local search performance.
manifest()
function$apps
$list
directly[System.IO.File]::ReadAllText()
instead ofGet-Content
Motivation and Context
Closes #4239
Relates to #4818
How Has This Been Tested?
Checklist:
develop
branch.