emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 18 Jan 2024 06:44:48 -0800

how expensive? dont know yet, I was following up on why it was showing
up as significant when profiling.


Michael Albinus writes:
 > Eli Zaretskii <eliz@gnu.org> writes:
 > 
 > Hi,
 > 
 > >> global-auto-revert-mode also appears to trigger file-remote-p -- that
 > >> would be one example where the call could be usefully memoized.
 > >
 > > Michael will tell, but I don't think this can be memoized, since file
 > > handlers can change dynamically behind autorevert's back.
 > 
 > Indeed. And even if it would be only Tramp's file name handler, this
 > cannot be memoized, because remote file name syntax can change on the
 > fly. See command `tramp-change-syntax'.
 > 
 > And I also ask the same question as Eli: How expensive is a single
 > `file-remote-p' call? In the Tramp case it is designed to avoid going
 > remote unless a remote connection is already established. And if the
 > file name in question does not match the remote file name syntax, it
 > returns nil almost immediately.
 > 
 > Best regards, Michael.

-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]