[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-remote-p being called too often?
From: |
T.V Raman |
Subject: |
Re: file-remote-p being called too often? |
Date: |
Wed, 17 Jan 2024 13:01:57 -0800 |
good catch, will chase that down.
David Ponce writes:
> > 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
--
- Re: file-remote-p being called too often?, David Ponce, 2024/01/17
- Re: file-remote-p being called too often?, T.V Raman, 2024/01/17
- Re: file-remote-p being called too often?, Eli Zaretskii, 2024/01/18
- Re: file-remote-p being called too often?, Michael Albinus, 2024/01/18
- Re: file-remote-p being called too often?, T.V Raman, 2024/01/18
- Re: file-remote-p being called too often?, Eli Zaretskii, 2024/01/18
- Re: file-remote-p being called too often?, T.V Raman, 2024/01/18