GNU bug report logs - #34343
[PATCH] Make project--find-regexp-in-files work with remote files

Previous Next

Package: emacs;

Reported by: Felicián Németh <felician.nemeth <at> gmail.com>

Date: Wed, 6 Feb 2019 08:19:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #74 received at 34343 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 34343 <at> debbugs.gnu.org,
 Felicián Németh <felician.nemeth <at> gmail.com>
Subject: Re: bug#34343: [PATCH] Make project--find-regexp-in-files work with
 remote files
Date: Fri, 3 Jan 2020 03:52:27 +0300
On 02.01.2020 12:48, Michael Albinus wrote:
> Then I have removed everything from tramp-handle-file-remote-p which
> isn't necessary for the 'localname case, and I came to
>  ...
> I cannot confirm "twice as long". I've tried ...

My file names are longer still. I can give a specific example later, if 
you like.

> The difference is likely because tramp-file-name-regexp has been
> applied to a longer string.
> 
> If I simplify tramp-file-name-regexp, we get ...

Both are fine avenues for exploration, I think.

But most importantly for now: tramp-handle-file-remote-p does not take 
up the majority of time spent in file-remote-p. tramp-file-name-handler 
does:

ELISP> (benchmark 10000 '(file-remote-p "/ssh:abc <at> def.com:/%d"
                                 nil t))
"Elapsed time: 3.535115s (2.112970s in 27 GCs)"

ELISP> (benchmark 10000 '(tramp-handle-file-remote-p 
"/ssh:abc <at> def.com:/%d" nil t))
"Elapsed time: 0.780867s (0.645621s in 8 GCs)"

ELISP> (benchmark 10000 '(find-file-name-handler "/ssh:abc <at> def.com:/" 
'file-remote-p))
"Elapsed time: 0.070135s"

ELISP> (benchmark 10000 '(tramp-file-name-handler 'file-remote-p 
"/ssh:abc <at> def.com:/%d"  nil t))
"Elapsed time: 3.409674s (2.070461s in 27 GCs)"

And that function does a lot of things that I'm not sure we need to just 
get the remote id.




This bug report was last modified 3 years and 303 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.