GNU bug report logs -
#34343
[PATCH] Make project--find-regexp-in-files work with remote files
Previous Next
Full log
Message #74 received at 34343 <at> debbugs.gnu.org (full text, mbox):
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.