Another attempt to improve the search performance#5324
Another attempt to improve the search performance#5324r15ch13 wants to merge 20 commits intoScoopInstaller:developfrom
Conversation
|
WIP or Ready for review? |
|
Some more areas for optimization:
|
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Sorry but I found |
@niheaven |
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
|
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$listdirectly[System.IO.File]::ReadAllText()instead ofGet-ContentMotivation and Context
Closes #4239
Relates to #4818
How Has This Been Tested?
Checklist:
developbranch.