-
Notifications
You must be signed in to change notification settings - Fork 30
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
Get-FrequentFolders in ssh session is very slow #134
Comments
I have a similar issue locally, without SSH – running |
For me this happened because an inaccessible network drive was pinned to Quick Access. Or rather, the link became inaccessible after upgrading to Windows 11. Unpinning and pinning it again worked, but it's still slower than without the pin and I don't need it. Thanks, I wouldn't have found it without your investigation :) For you it's probably also smth about a network link. |
Same issue here, profiling (with https://github.com/nohwnd/profiler) shows this as taking 500ms, and looking at the data it grabs it adds no value for me because I don't go to those same folders in commandline (e.g. my profile). |
This repo seems dead, and I still depend on this tool. I tried to reach vors in the past, as well as here on the PRs. And so now I forked the repo, and am pushing new versions of the module to psgallery https://www.powershellgallery.com/packages/ZLocation2/2.1.1 Currently I fully removed the frequent folders functionality. |
I've noticed that whenever I SSH into a Windows 11 host with Z-Location as part of the profile that it takes 2-3 minutes to load my profile.
I've narrowed it down to Z-Location. Then, still in SSH, I started a new instance of
pwsh -noprofile
and manually ran the steps of theZLocation.psm1
file to narrow down the slow part. The slow parts are:Get-FrequentFolders | ForEach-Object {Add-ZWeight -Path $_ -Weight 0}
which takes 260 secondsGet-FrequentFolders
by itself takes 320 seconds$QuickAccess = New-Object -ComObject shell.application
takes 0.0022 seconds$QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}")
takes 0.012 seconds$QuickAccess.Namespace("shell:::{679f85cb-0220-4080-b29b-5540cc05aab6}").Items()
takes 320 seconds(I'm aware I'm using a slightly older version of z-location but the content of the functions in question are not substantially different)
I've disabled the Get-FrequentFolders part of the powershell module on my remote host and now profile loading is almost instant again.
I don't think the root cause of this issue is to do with Z-Location but rather some sort of COM weirdness within Win32-OpenSSH.
However, it would be nice to optionally disable that the Get-FrequentFolders function. Is that possible?
Other details:
The text was updated successfully, but these errors were encountered: