From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: file-remote-p being called too often? Date: Thu, 18 Jan 2024 07:56:58 +0200 Message-ID: <838r4nb2vp.fsf@gnu.org> References: <0eaa7499-dc5e-4bc5-828d-2465b23bc586@orange.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9682"; mail-complaints-to="usenet@ciao.gmane.io" Cc: da_vid@orange.fr, emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 18 06:58:09 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rQLPk-0002Kb-LH for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Jan 2024 06:58:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQLOn-0006XW-AV; Thu, 18 Jan 2024 00:57:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQLOl-0006XI-Ot for emacs-devel@gnu.org; Thu, 18 Jan 2024 00:57:07 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rQLOk-0000QI-9Y; Thu, 18 Jan 2024 00:57:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=WH4MWQqIJN2guHsBHXwW3RD67rccyJuZygYd/aGUK7w=; b=HgsB8JFPEesm Whrn4HMRK9t8dRHpimgDOrYsnxXZOEhuccrQXDzyop/JhNwGGP1QYymAMR7/3ymHMWXyx596JTeJ/ TK/dp4amADnjPAgrVkH6OTYvQXiePzjjHXRhNO6GE5vlAlSoBha8ZsYZvpjgFdx/xAe/k6ycE6KzA qT5AY4W2Q5LRRUHYBCon3Y5QFdrmhWCw7cOw592Pjl62UOxOEOF0DMbkzXiLkATRtIn+IIktVaen1 p14VFgSzL1jgrqLQJQLr7VZ6OhdhQLGdxqknXIM3u2Ho3/abAW7gyNCxNQvwpcZ5v8+f/Q3JK6KrE PX3YPwO0CDv9s5cdSGKnRA==; In-Reply-To: (raman@google.com) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315073 Archived-At: > From: "T.V Raman" > Cc: Emacs Devel , Eli Zaretskii > Date: Wed, 17 Jan 2024 13:56:44 -0800 > > 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. AFAIU, autorevert calls file-remote-p only when there are notifications about changes in some visited files, so when Emacs is idle it should not call file-remote-p due to global-auto-revert-mode.