lsd is slow Windows
Closed this issue ยท 20 comments
Performance is very slow - about 50 seconds to list a few files.
The long delay appears to be in calling lsd::meta::windows_utils::get_acl_access_mask
.
Possibly relevant details - I'm testing on Win10 1903 on a domain joined machine. I suspect the issue is contacting the domain controller, because when I disconnect the machine from the network, lsd.exe
gives me this error:
cannot access '.': The specified domain either does not exist or could not be contacted. (os error 1355)
I also tested on a non-domain joined machine (Server 2016) and it seemed plenty fast.
Is windows even supported?
Hi!
Is windows even supported?
Yep but it's in early stage for now. I will soon add some documentation into the README.
Cool, because I was surprised to see Windows issues when I couldn't find anything in the readme. Nice! I will also try it in my secondary windows machine
I tried in Windows and it is as fast as in WSL, sometimes faster. But I do sometimes come across the error cannot access '.'
if -a
is passed. This error also sometimes happen in WSL when accessing files in Windows.
very very very slow in win 10, listing a directory with four sub-folders will cost one minute or more.
In WSL, its speed is normal.
Any news on this? The same directory works great in WSL but takes over 20s on Git Bash for me.
generally 1/10 speed of ls
This program has a severe performance problem on windows when the number of files to read is large (30+), it blocks almost 100ms untill it starts to render with
Core::display
, I dug on the issue and its located on the Win32 call toGetEffectiveRightsFromAclW
, I don't know why is so expensive.Proposed solutions:
- Figure out why that function call is so expensive (maybe we can't solve it)
- Be more inaccurate on windows about the permissions of the user and group (since its not very relevant on windows systems), for example the libcxx of llvm obtains the permissions of a file assuming its read only and then just checking if the property FILE_ATTRIBUTE_READONLY is set or not, assume that everything is executable and similar "inaccurate stuff"
- Change the creation of the
Meta
struct to only retrieve the owner/group permissions if its really needed to displayHope this helps
@cdecompilador please discuss the performance issue on windows here
I don't know Rust, but is there anything i can do to help #484 go forward? It seems that the (last?) hang up is regarding the PR code coverage?
hi @ArnaudKunzi, it seems there is not only the coverage, some discussions need to be resolved, and added some of mine just now, let's try to make it happen in the near future.
Would that help if I tried to fork @vvuk's PR #484 and resubmit it with the requested changes?
He doesn't seem to have much time at the moment.
Not sure to get it right on the first try but it seems rather straightforward. I just don't want to cause unnecessary confusion/duplication and waste the maintainers time.
Any progress on this issue?
The PR needs to be rebased to the latest main branch version but I don't have sufficient knowledge to solve all conflicts and accommodate the other changes that happened since, so unless someone else fixes it, this is it.
The PR needs to be rebased to the latest main branch version but I don't have sufficient knowledge to solve all conflicts and accommodate the other changes that happened since, so unless someone else fixes it, this is it.
have you asked for help/support from the other contributors?
Even the latest lsd-1.0.0
the slowness is there:
PS> .\lsd.exe --version
lsd 1.0.0
PS> (Measure-Command { & .\lsd.exe }).TotalSeconds
14,4527767
PS> .\lsd.exe
๏ autocomplete ๎ LICENSE ๏ญ lsd.1 ๏
บ lsd.exe ๎ README.md
as v1.0.0 is finally released, I will spend some time on this, We may improve this step by step, but I can not guarantee any time schedule...
it's welcome for any PR improvement to be sent!
I have a look at #484, and it is not difficult to implement as an option, so I did a POC
Any comment is welcome, and we could do it in this way if it works for people who meet this problem.
in my test.
version: lsd 1.0.0
eza v0.18.0
===
on wsl2
time (lsd -alih --icon=always -R)
real 0m5.525s
user 0m1.701s
sys 0m1.268s
time (Downloads/eza -alih --icons=always -R)
real 0m12.055s
user 0m5.418s
sys 0m13.722s
===
on windows
Measure-Command { lsd -alih --icon=always -R }
Days : 0
Hours : 0
Minutes : 0
Seconds : 2
Milliseconds : 996
Ticks : 29965805
TotalDays : 3.46826446759259E-05
TotalHours : 0.000832383472222222
TotalMinutes : 0.0499430083333333
TotalSeconds : 2.9965805
TotalMilliseconds : 2996.5805
Measure-Command { eza -alih --icons=always -R }
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 487
Ticks : 4878319
TotalDays : 5.6462025462963E-06
TotalHours : 0.000135508861111111
TotalMinutes : 0.00813053166666667
TotalSeconds : 0.4878319
TotalMilliseconds : 487.8319