From: David PONCE <david.ponce@wanadoo.fr>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: recentf-cleanup, file-readable-p & remote files
Date: Thu, 18 Sep 2003 10:48:04 +0200 (CEST) [thread overview]
Message-ID: <10995583.1063874884674.JavaMail.www@wwinf0401> (raw)
Hi,
> Ah, I think you misunderstood part of what I was trying to say --
> which is that `file-readable-p' can be very slow when you *are*
> connected (when I'm not connected it returns in a fraction of second,
> so that's not a problem)
>
> The reason is that that ange-ftp implements it rather inefficiently.
> Instead of just listing the file in question it lists *all* files in
> the directory. That's a lot of data if the directory contains
> thousands of files. In the example from my previous post doing
> `file-readable-p' is ~500 times slower than actually fetching the
> file!
OK, thank you for the explanation, I understand better now!
Could you try file-exists-p please? Does it work better?
A possibility could be to consider that remote files are always
readable and change `recentf-file-readable-p' like this:
(defsubst recentf-file-readable-p (filename)
"Return t if file FILENAME exists and you can read it.
Assume that remote files are always readable."
(or (file-remote-p filename)
(file-readable-p filename)))
Remote files then could be manually removed from the recent list (M-x
recentf-edit-list), or will be removed naturally by the LRU mechanism
if they are not accessed for a long time (see the option
`recentf-max-saved-items').
Perhaps, in your case, another acceptable workaround could be to
disable the `recentf-auto-cleanup' feature (customize this option to
`never'), and let the LRU mechanism eliminate files not accessed for a
long time.
Thoughts?
David
next reply other threads:[~2003-09-18 8:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-18 8:48 David PONCE [this message]
2003-09-19 1:45 ` recentf-cleanup, file-readable-p & remote files Jesper Harder
-- strict thread matches above, loose matches on Subject: below --
2003-09-16 7:51 David PONCE
2003-09-16 7:58 ` Miles Bader
2003-09-17 18:02 ` Richard Stallman
2003-09-17 20:12 ` Jesper Harder
2003-09-18 15:14 ` Richard Stallman
2003-09-17 2:10 ` Jesper Harder
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10995583.1063874884674.JavaMail.www@wwinf0401 \
--to=david.ponce@wanadoo.fr \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).