|
From: | David Ponce |
Subject: | Re: file-remote-p being called too often? |
Date: | Wed, 17 Jan 2024 20:57:12 +0100 |
User-agent: | Mozilla Thunderbird |
this is with emacs built from Git@HEAD: Discovered while profiling code in *scratch* via profiler-report: It looks like file-remote-p gets called from a timer (not started by e) and that that function shows up as being one of the ones eating cycles.
I wonder if the problem could be due to recentf if the option `recentf-auto-cleanup' is enabled to cleanup the recentf list each time Emacs has been idle during N seconds? Because in this case, the function `recentf-cleanup' is called every N seconds, in turn calling `recentf-keep-p' to checks if a file name should be kept in the recentf list based on the `recentf-keep' option, whose default value is the predicate `recentf-keep-default-predicate' that uses `file-remote-p': (defun recentf-keep-default-predicate (file) "Return non-nil if FILE should be kept in the recent list. It handles the case of remote files as well." (cond ((file-remote-p file nil t) (recentf-access-file file)) ((file-remote-p file)) ((file-readable-p file)))) Regards
[Prev in Thread] | Current Thread | [Next in Thread] |