-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
Do not pre-compute MountInfo to reduce readlink calls #834
Do not pre-compute MountInfo to reduce readlink calls #834
Conversation
1a60789
to
3c26021
Compare
Thanks for doing this! I obviously didn't check the performance when I added this functionality. It seemed logical at the time. |
Yeah it does seem logical. It feels strange that |
#558 this always made me curious as to what exactly was the cause of this (obviously not to say it's one thing in particular, in fact this may not have even been merged at the time of the issue). But I agree it's definitely not always obvious. Big thanks again. Looks like we are heading for a significant perf improvement :D |
3c26021
to
47eca6e
Compare
This is so nice, thanks a lot :3 re: it being hard to guess what slows down eza, I've though for a while that we should include some performance testing step in reviews, but I haven't really found the time to figure out how we should do it. |
To be clear, I wasn't blaming eza for that. It's just hard in general. At uutils we've been thinking about tracking the number of syscalls, maybe that could work for you? We haven't set that up yet, because it doesn't feel super important in the end. |
1 similar comment
To be clear, I wasn't blaming eza for that. It's just hard in general. At uutils we've been thinking about tracking the number of syscalls, maybe that could work for you? We haven't set that up yet, because it doesn't feel super important in the end. |
That sounds like an okay solution actually, we should do this. Also NW didn't think you were blaming eza! |
More speedups! In my previous PR I mentioned being baffled by the
readlink
andgetcwd
and I figured out where they came from:File::mount_point_info
, which callsstd::fs::canonicalize
. The easy fix was to not call that when it's not necessary, which turns out to be most of the time!Here's a benchmark: