all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Ponce <da_vid@orange.fr>
To: Emacs Devel <emacs-devel@gnu.org>
Cc: raman@google.com, Eli Zaretskii <eliz@gnu.org>
Subject: Re: file-remote-p being called too often?
Date: Wed, 17 Jan 2024 20:57:12 +0100	[thread overview]
Message-ID: <0eaa7499-dc5e-4bc5-828d-2465b23bc586@orange.fr> (raw)

> 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



             reply	other threads:[~2024-01-17 19:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 19:57 David Ponce [this message]
2024-01-17 20:34 ` [External] : Re: file-remote-p being called too often? Drew Adams
2024-01-17 21:01 ` T.V Raman
2024-01-17 21:04 ` T.V Raman
2024-01-17 21:18 ` T.V Raman
2024-01-18  5:41   ` Eli Zaretskii
2024-01-18 14:43     ` T.V Raman
2024-01-17 21:56 ` T.V Raman
2024-01-18  5:56   ` Eli Zaretskii
2024-01-18  7:30     ` Michael Albinus
2024-01-18 14:44       ` T.V Raman
2024-01-18 15:07         ` Eli Zaretskii
2024-01-18 15:57           ` T.V Raman
2024-01-18 16:28             ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2024-01-16 21:17 T.V Raman
2024-01-17 11:54 ` Michael Albinus
2024-01-17 14:55   ` T.V Raman
2024-01-17 15:28     ` Michael Albinus
2024-01-17 18:15       ` T.V Raman
2024-01-17 12:00 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0eaa7499-dc5e-4bc5-828d-2465b23bc586@orange.fr \
    --to=da_vid@orange.fr \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raman@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.