[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: testing for a remote file to include file on a Windows mapped drive
From: |
Drew Adams |
Subject: |
RE: testing for a remote file to include file on a Windows mapped drive |
Date: |
Mon, 5 May 2008 09:12:03 -0700 |
> >> > 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.