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: Tue, 29 Apr 2008 23:23:54 -0700 Message-ID: <004101c8aa8a$c479e230$0200a8c0@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> 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 1209536823 12395 80.91.229.12 (30 Apr 2008 06:27:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 06:27:03 +0000 (UTC) Cc: jasonr@gnu.org, michael.albinus@gmx.de, emacs-devel@gnu.org To: "'Stefan Monnier'" , "'Eli Zaretskii'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 30 08:27:37 2008 connect(): Connection refused 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 1Jr5mz-0001YD-3k for ged-emacs-devel@m.gmane.org; Wed, 30 Apr 2008 08:27:37 +0200 Original-Received: from localhost ([127.0.0.1]:59352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr5mI-0006dB-3H for ged-emacs-devel@m.gmane.org; Wed, 30 Apr 2008 02:26:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Jr5mC-0006cO-VF for emacs-devel@gnu.org; Wed, 30 Apr 2008 02:26:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Jr5mB-0006bw-Kq for emacs-devel@gnu.org; Wed, 30 Apr 2008 02:26:48 -0400 Original-Received: from [199.232.76.173] (port=39805 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Jr5mB-0006bq-9M for emacs-devel@gnu.org; Wed, 30 Apr 2008 02:26:47 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Jr5m2-0000HT-AW; Wed, 30 Apr 2008 02:26:38 -0400 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Jr5lA-0001N5-NB; Wed, 30 Apr 2008 02:25:44 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m3U6Olv5016886; Wed, 30 Apr 2008 00:24:48 -0600 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m3U3gVYF003826; Wed, 30 Apr 2008 00:24:46 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3662938361209536631; Tue, 29 Apr 2008 23:23:51 -0700 Original-Received: from dradamslap1 (/141.144.88.165) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 29 Apr 2008 23:23:51 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AciqemxQL14aSBrdQX2FAq5OPi/QfQACkSlA 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 mx20.gnu.org: Linux 2.4-2.6 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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:96198 Archived-At: > >> >> I just have noticed several different concerns that tend to be > >> >> conflated: > >> >> - reliability and performance. > >> >> - ability to access the file via syscalls. > >> >> - whether relative file names can be used from one file > >> >> name to another. > >> >> - whether a file's contents is directly accessible via syscalls. > >> > >> > I think Drew had yet another concern, which is uncovered > >> > by the above. > >> > >> Which one? > > > The case with remote volumes mounted via the OS facilities such as > > NFS. They are almost identical in reliability and performance to > > local volumes, and cannot be distinguished using file-remote-p, but > > Drew insisted on being able to distinguish them anyway. > > Not sure if it's a different case. IIUC he's worried about the > different reliability and/or performance of those volumes, but > admittedly, that wasn't stated clearly, Huh? I stated clearly and explicitly several times that my only concern was performance. I want a test that is quick and tells whether a file name names a file whose access is likely to be slow, compared to a file on a local hard disk (normal disk, no USB stick or CD etc.). There are apparently three levels in terms of performance, from fastest to slowest: (1) local, (2) mapped network drive, (3) truly remote (e.g. ftp/tramp access). According to Eli's test figures, #2 was three times slower than #1, and #3 was "two orders of magnitude" slower than #1. I won't argue the numbers - suffice it to say that we agree that there are three levels. `file-remote-p' currently distinguishes #1 and #2 from #3. That's reasonable, since #3 is so much slower, per Eli's figures. Nevertheless, I want to also be able to distinguish #1 from #2 and #3. For some applications, a file on a mapped network drive is, like a truly remote file, too slow, and I want to avoid accessing it. Whether the same predicate works for both types of distinction or multiple predicates are provided, I don't care. Whether it is `file-remote-p' or some other predicate that does what I want, I don't care. `file-remote-p' is also slower than it could be, at least for some file names. For file names that `ffap-file-remote-p' determines are remote, calling it is faster - Michael found it to be about 70 times faster than `file-remote-p'. I suggested incorporating the ffap test into `file-remote-p'. In any case, my only concern is performance, in two senses: (a) The main concern, and the aim, is to avoid the cost of slow file access. (b) A secondary concern is to make that check itself fast.