-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Avoid expensive file-truename
call when possible
#3430
base: master
Are you sure you want to change the base?
Conversation
Did you get some noticeable speedup from this? |
I couldn't reproduce any slowness to begin with. Perhaps I could if I set up an intentionally slow TRAMP connection, but that's quite the setup. I found it enough to check that values were equivalent for all cases. |
I'm just way of making changes without being able to demonstrate the value of the change (as the proposed code is a bit more complex than the original one). |
I guess you can also try to have whoever complained about this to test your proposed fix? |
Full disclosure, the biggest fix will be this one #3435 Still, this looks to me like a worthwhile fix:
Therefore it would seem sensible to prevent a performance issue, instead of waiting for someone to experience it (which doesn't even guarantee that we will get it reported!) Perhaps I can tidy up things by extracting the helper to a defun? And show with buttercup tests its equivalence. |
That would be nice. |
I'll retake this PR after we get to address #3468 - otherwise not cool to further touch this area with a release around the corner |
This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed soon if no further activity occurs. Thank you for your contribution and understanding! |
file-truename
can be slow (different Emacs projects work around this in a number of ways). Apparently, it checks for symlinks as it traverses each directory of a given path.This PR observes the
buffer-file-truename
buffer-local variable, that has that info already computed for us.https://www.gnu.org/software/emacs/manual/html_node/elisp/Buffer-File-Name.html#index-buffer_002dfile_002dtruename
I've tried it successfully locally, and over TRAMP.