[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#56342: TRAMP (sh) issues way too many commands, thus being very slow
From: |
Michael Albinus |
Subject: |
bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks |
Date: |
Mon, 04 Jul 2022 12:33:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Michael Albinus <michael.albinus@gmx.de> writes:
Hi Paul,
>> Suggested improvements:
>>
>> * TRAMP should issue just one `stat' command to find out most of the
>> things about a file: whether it exists, if it is a directory, its real
>> name when dereferencing links and whatever stats it is used to find
>> now; from `$ stat --help' this seems to be possible. In other words,
>> TRAMP shouldn't use simple commands like `test -e': any ping, even
>> nominal, will negate any gains from using a tad faster command.
>> Instead, if it needs to find anything about a file, it should ask the
>> remote about as many things as possible in one go: it is very likely
>> that the additional information will be needed soon and even if not,
>> this is basically free compared to ping anyway.
>
> Not all remote hosts carry a stat command, and not all existing stat's
> are GNU compatible. But yes, if possible, Tramp shall gather as much
> information in one run, and cache the results for further use.
FTR, stat is not sufficient to detect the real file name. Example:
# touch /tmp/a
# ln -s /tmp/a /tmp/b
# ln -s /tmp/b /tmp/c
# stat -c %N /tmp/c
It returns "'/tmp/c' -> '/tmp/b'". However, we need "/tmp/a". So we must
still use "readlink --canonicalize".
Best regards, Michael.
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, (continued)
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Paul Pogonyshev, 2022/07/03
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Michael Albinus, 2022/07/03
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Paul Pogonyshev, 2022/07/03
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Michael Albinus, 2022/07/04
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Paul Pogonyshev, 2022/07/04
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Michael Albinus, 2022/07/04
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Paul Pogonyshev, 2022/07/26
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Michael Albinus, 2022/07/26
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Paul Pogonyshev, 2022/07/26
- bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks, Michael Albinus, 2022/07/26
bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks,
Michael Albinus <=