From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: file-remote-p being called too often? Date: Thu, 18 Jan 2024 06:44:48 -0800 Message-ID: <26025.14688.196894.440943@retriever.mtv.corp.google.com> References: <0eaa7499-dc5e-4bc5-828d-2465b23bc586@orange.fr> <838r4nb2vp.fsf@gnu.org> <87il3r6quh.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10201"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eliz@gnu.org, raman@google.com, da_vid@orange.fr, emacs-devel@gnu.org To: michael.albinus@gmx.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 18 15:45:34 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 1rQTe8-0002Pn-TY for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Jan 2024 15:45:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQTdY-0003Uc-6V; Thu, 18 Jan 2024 09:44:56 -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 1rQTdW-0003UH-GG for emacs-devel@gnu.org; Thu, 18 Jan 2024 09:44:54 -0500 Original-Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rQTdU-00076s-9N for emacs-devel@gnu.org; Thu, 18 Jan 2024 09:44:54 -0500 Original-Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1d3eb299e2eso75624935ad.2 for ; Thu, 18 Jan 2024 06:44:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705589090; x=1706193890; darn=gnu.org; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:from:to:cc:subject:date :message-id:reply-to; bh=bXLeDahz9i0QSFk9J6LRiKeEWx5c/xbctJG+NOEOHVo=; b=ZoHTNtbnZwlpdIBWjx5psFtz9nxsrxHjiCJgxkv97oKV1YOyhrPASML+O/CYzBXBAg hzGaHL0v+fC19HaVgSPmAISgMDAwUfIHdNLiX0uDi/1KbVCvDPkTxVhciw0TaR+aYDlS X7An4TWtpdvQxjfhoNvGSzwyRCSzSldcPHzwyfx8xrKdyjlMv5KbRZANtcpA6DXYE8GZ 8MP+9eyG6yckk/n3hOY5cAtLmBbgDrOlLZkGsETiRcA5ItjglE2W1/UKBmBjpWHpnAAg mXdDSQ1Ko2zsE1RyD0zvucNSodeoC/7DBvoY9F5NZeELT0w9VoRBTVw/eRH2WuDtT7UJ Bz4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705589090; x=1706193890; h=references:in-reply-to:subject:cc:to:date:message-id :content-transfer-encoding:mime-version:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=bXLeDahz9i0QSFk9J6LRiKeEWx5c/xbctJG+NOEOHVo=; b=QUPYllvMdc/FY0HfPn+AZBvpw08C4nBAYjjuwhGfkQxp2uwU6B427DFeoTsvpGnaDG g37P1SGHgwc6EZ2+ItDLBYYU1xmiQvGzO4HJUuCZShSEA5W/WILoC/rGi8MAsLsc1xce VaGNYhwlVxZ7QLps1bEBe0JAh9OEeWUA1dnYhfOK/6ou31pJb76G2Ob5prcBywgXkTZQ JeKfB+gwvvag0BZXw+CVvjGIDdNe2ZTxZDPUGvEmmNkXwwgClPwlQ/wsfK+YkVlQNST1 HA0223ST14dqPDV/KGjrS1M9OHbSt7URISoJ+horZnmT1t648t3v/zK85AWUxDxivSE7 /SNg== X-Gm-Message-State: AOJu0YwY1AD4L6uZGE6sglrSFSefuimPOTRg671rph1yNVB08xeci3Ae khbdlnz0vREESXYxJez7Pj+X5wyxCHHr3grw/deFz/FmZP6HNv6l+b7bXVGNRpiD/rVVCJ0k1YR WBw== X-Google-Smtp-Source: AGHT+IEm2QC6uQJJUU5JHjDK9z87IBdRFJwLch61s4NrH2BIi/r1sjMIgnjUOzroiLfFttiN404jOA== X-Received: by 2002:a17:903:32c8:b0:1d7:18de:bc7b with SMTP id i8-20020a17090332c800b001d718debc7bmr46879plr.101.1705589089889; Thu, 18 Jan 2024 06:44:49 -0800 (PST) Original-Received: from retriever.mtv.corp.google.com ([2620:15c:b5:1:8a2c:be36:e500:8cc7]) by smtp.gmail.com with ESMTPSA id la8-20020a170902fa0800b001d54b75f087sm1482764plb.174.2024.01.18.06.44.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 06:44:49 -0800 (PST) In-Reply-To: <87il3r6quh.fsf@gmx.de> X-Mailer: VM 8.1.1 under 30.0.50 (x86_64-pc-linux-gnu) Received-SPF: pass client-ip=2607:f8b0:4864:20::631; envelope-from=raman@google.com; helo=mail-pl1-x631.google.com X-Spam_score_int: -193 X-Spam_score: -19.4 X-Spam_bar: ------------------- X-Spam_report: (-19.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-1.748, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action 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:315088 Archived-At: how expensive? dont know yet, I was following up on why it was showing up as significant when profiling. Michael Albinus writes: > Eli Zaretskii 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. --