From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: testing for a remote file to include file on a Windows mapped drive Date: Mon, 5 May 2008 08:47:27 -0700 Message-ID: <000f01c8aec7$5288ef90$c2b22382@us.oracle.com> References: <87bq781bf7.fsf@gmx.de><000a01c8a314$5fff7630$0200a8c0@us.oracle.com><000d01c8a324$97820590$0200a8c0@us.oracle.com><000f01c8a334$b2a40660$0200a8c0@us.oracle.com><000101c8a37f$eeb543d0$0200a8c0@us.oracle.com> <004101c8aa8a$c479e230$0200a8c0@us.oracle.com><004b01c8aaca$2783bd80$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1210002583 6558 80.91.229.12 (5 May 2008 15:49:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 15:49:43 +0000 (UTC) Cc: 'Eli Zaretskii' , jasonr@gnu.org, 'Stefan Monnier' , emacs-devel@gnu.org To: "'Michael Albinus'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 05 17:50:18 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Jt2x8-00040l-Ga for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 17:50:10 +0200 Original-Received: from localhost ([127.0.0.1]:49849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt2wQ-0000eU-Th for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 11:49:26 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt2vw-0000Oo-6I for emacs-devel@gnu.org; Mon, 05 May 2008 11:48:56 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt2vu-0000OC-T1 for emacs-devel@gnu.org; Mon, 05 May 2008 11:48:55 -0400 Original-Received: from [199.232.76.173] (port=50623 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt2vu-0000O6-Ml for emacs-devel@gnu.org; Mon, 05 May 2008 11:48:54 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jt2vb-0004h8-Lt; Mon, 05 May 2008 11:48:36 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m45FmSUP027446; Mon, 5 May 2008 09:48:28 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m450fBvr022656; Mon, 5 May 2008 09:48:27 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3666535371210002448; Mon, 05 May 2008 08:47:28 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 May 2008 08:47:27 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AciuxVNWvgrEp3K7T6am3Eu4BNcYrwAATPEg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96503 Archived-At: > > I offered to describe my use case, but it won't prove > > anything special in this regard. Suffice it to say that > > I would like the test to be about as quick as > > `ffap-rfs-regexp' for the regexps that `ffap-rfs-regexp' handles. > > The test via `file-remote-p' is slower than via `ffap-file-remote-p'. > In my profiling, it was 0.0007140419 sec vs 0.00001117 sec for one > call. A factor of 64, yes, but does it really count? Yes, for my case it does. It all depends what the test is used for, when, and how often. This is why I've argued for something flexible - either more than one test function or an ability to call the test function differently. For some applications, a slowdown of 3x or 64x makes a big difference. For others, it is negligible. I am not arguing that every use of a file-name test to determine the likely access time needs to consider network mapped drives or files whose names match `ffap-rfs-regexp' as "remote" (in the sense of slow). I am looking for a test that allows that determination, but I'm not asking that that definition of "slow" be applicable to every use.