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 09:12:03 -0700 Message-ID: <001001c8aeca$c240c2b0$c2b22382@us.oracle.com> References: <87bq781bf7.fsf@gmx.de><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><000f01c8aec7$5288ef90$c2b22382@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 1210004011 12297 80.91.229.12 (5 May 2008 16:13:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 May 2008 16:13:31 +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 18:14:08 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 1Jt3KE-0005dg-Sx for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 18:14:03 +0200 Original-Received: from localhost ([127.0.0.1]:43368 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt3JX-0007dB-4h for ged-emacs-devel@m.gmane.org; Mon, 05 May 2008 12:13:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jt3JT-0007bd-Ku for emacs-devel@gnu.org; Mon, 05 May 2008 12:13:15 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jt3JS-0007aN-4t for emacs-devel@gnu.org; Mon, 05 May 2008 12:13:15 -0400 Original-Received: from [199.232.76.173] (port=39853 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jt3JR-0007aD-RU for emacs-devel@gnu.org; Mon, 05 May 2008 12:13:13 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jt3JJ-00013u-DZ; Mon, 05 May 2008 12:13:05 -0400 Original-Received: from agmgw1.us.oracle.com (agmgw1.us.oracle.com [152.68.180.212]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m45GCwpL022366; Mon, 5 May 2008 11:12:58 -0500 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by agmgw1.us.oracle.com (Switch-3.2.0/Switch-3.2.0) with ESMTP id m45DXsGj026252; Mon, 5 May 2008 10:12:58 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3666543191210003924; Mon, 05 May 2008 09:12:04 -0700 Original-Received: from dradamslap1 (/130.35.178.194) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 May 2008 09:12:03 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AciuyNIAWSQ3UtH1SiCWWgs3/JV7VQAAHPqQ 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:96507 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. > > Oops, maybe there is a misunderstanding? (Forgive me my bad English) > I meant the time a call of `file-remote-p' needs to run. I don't > comment *why* you need such a test. > > Even if you have a function which calls 100x `file-remote-p', > this would > last 0.07140419 sec only. Does it really count? Yes, I believe so. Again, I don't care if it is `file-remote-p' that makes such a check or some other function. I won't enter join discussion with Stefan about where to do these things and what the "real" purpose of `file-remote-p' should be, because I'm indifferent about that. Whatever function (`file-remote-p' or some new function) tests for probable slow file access, I think it should try to be quick. And if it can sometimes be 64 times quicker by testing the `ffap-rfs-regexp' first, well, that is useful time gained. IOW, instead of my calling both `ffap-remote-p' and `file-remote-p', in that order, I would prefer to call a single function. But admittedly, I can continue to call both. I think the real discussion about whether to incorporate `ffap-rfs-regexp' into `file-remote-p' has to do with the disagreement you and Stefan have wrt the mission (aim) of `file-remote-p'. My point here is that a test for possibly slow file access should include a test for `ffap-rfs-regexp', and it should do that before the slower checks used by the current `file-remote-p'. What the function that tests for possibly slow file access is called (`file-remote-p' or something else) is another matter, about which I have no opinion.