From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.bugs Subject: bug#56342: TRAMP (sh) issues way too many commands, thus being very slow over high-ping networks Date: Mon, 1 Aug 2022 22:20:41 +0200 Message-ID: References: <8735fjh5ge.fsf@gmx.de> <87v8sefl2f.fsf@gmx.de> <874jzyc9u9.fsf@gmx.de> <87sfnhazvy.fsf@gmx.de> <87k08sc02z.fsf@gmx.de> <87r128gdob.fsf@gmx.de> <87mtcvhidx.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000084b39605e533bc46" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6121"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56342@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 01 22:23:23 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oIbwh-0001T7-0a for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 22:23:23 +0200 Original-Received: from localhost ([::1]:36638 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIbwg-0008SD-0u for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 01 Aug 2022 16:23:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIbvQ-0007TD-Nu for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:22:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51959) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIbvQ-0001qO-Ey for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:22:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oIbvO-0002do-AV for bug-gnu-emacs@gnu.org; Mon, 01 Aug 2022 16:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Pogonyshev Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Aug 2022 20:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56342 X-GNU-PR-Package: emacs Original-Received: via spool by 56342-submit@debbugs.gnu.org id=B56342.165938526510064 (code B ref 56342); Mon, 01 Aug 2022 20:22:02 +0000 Original-Received: (at 56342) by debbugs.gnu.org; 1 Aug 2022 20:21:05 +0000 Original-Received: from localhost ([127.0.0.1]:41708 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIbuQ-0002c9-Pe for submit@debbugs.gnu.org; Mon, 01 Aug 2022 16:21:05 -0400 Original-Received: from mail-oa1-f47.google.com ([209.85.160.47]:38711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oIbuM-0002bG-DS for 56342@debbugs.gnu.org; Mon, 01 Aug 2022 16:21:01 -0400 Original-Received: by mail-oa1-f47.google.com with SMTP id 586e51a60fabf-10ee900cce0so3040109fac.5 for <56342@debbugs.gnu.org>; Mon, 01 Aug 2022 13:20:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c2pwCdT3ROKkjRiqywkTD1ufWj6tVX6cmM2APwTRvgI=; b=aINzs4KtinTIAChkWviRHLJeWLzejQ1BitTQJKh1VtitsEYyahTGq1Z7bFREPPHlkM KOgXs2Uf+y8BmhoiiE3Is9P2+0dhl8kJ10DIUAWt7m2S1p0iWdgNEt7QtRoVnc5wM+eg nZGhNpxX25h5mrBFCmCE3obim/AlXgUgfH00mw72nuiQp+Zw5MO4IMjrKSOnmu3yZC7S IImKWqJF23hNIDqiuTzr03qthZyHLTG+NzK6cyzYWhxaNkBFPLeR4E3GCamGMg5d0CM2 5UnNwJ/sssM1kTHDbp47NotAkeqbynnFZCwsW42Uw6dghVaj9Go6Qsi5LmDqhFFHhd5T UcHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c2pwCdT3ROKkjRiqywkTD1ufWj6tVX6cmM2APwTRvgI=; b=VtC16oiQilKE6iqDKsjwRRogaUCboGb2mLJ72RPhI3FaP3tQXrdRWQ8itrfOHsmJZp e03Agvqdu3oBJ4nuG6ILdyPiPz4qrFJXTV0NNxf5IK8BwASP1/RwgaonKdwxPZ+y1+12 g9ClvUygCxZL5cLjwmMLjSewQ64ssdT83perxoupMiDB84OKyXRQaW3pnmTRJd3I5Rz/ KpczXlvh0QVft11WRK+QaR7neNuKYFGgPp1Ldz+wimIRsWac/lSsJTS78uIfRB1nuMs8 NgnjRdTvzAgjPnYc2QUVDXhoju6ut/wdMzJKzBq3p5m+gCJK4SRp4xTlCSZRw4TQMpQQ JlJA== X-Gm-Message-State: AJIora/UOuiJBNdU8cCvMgpxqr310ofkzDyI4Dg6GvKWavIy2qb+5gL8 gaCrLIdQYSPxVFn/fktTD8TNEsffXe6dOBCGdH5nBn6eDA== X-Google-Smtp-Source: AGRyM1setK2PZbCZm8msb2xkFoWb7u961sZmnA461rbPA9jR6xAVRR5lzmdslHvtDJm0vDSPPSos+Je/GlwWW2wR3/U= X-Received: by 2002:a05:6870:d78a:b0:10e:45a6:a400 with SMTP id bd10-20020a056870d78a00b0010e45a6a400mr8034013oab.27.1659385252458; Mon, 01 Aug 2022 13:20:52 -0700 (PDT) In-Reply-To: <87mtcvhidx.fsf@gmx.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:238466 Archived-At: --00000000000084b39605e533bc46 Content-Type: text/plain; charset="UTF-8" > As said, I live in a pretty good connected LAN. remote commands do not > result in heavy performance degradations, compared with the rest of > Elisp computing. Understood, but I propose to adopt a different benchmark: number of remote commands. As soon as you are not in a LAN, even not when using a particularly slow network, this becomes an order or two of magnitude more important than everything else. E.g. with slightly slower commands or particularly inefficient Elisp you can make it 2-10 ms slower for everyone. But with unoptimized command flow (i.e. more remote commands) it can be 100-500 ms slower, though not for everyone, but people using this over non-LAN. I think in such cases extremes are more important than the average. > > On the other hand, refreshing a remote-tracking Magit (Emacs Git > > interface) buffer doesn't feel any faster than before. Logs also > > suggest that number of commands that tramp send stays as before (43). > > Some commands are certainly excessive, e.g. it repeats `test -d [...] > > 2>/dev/null; echo tramp_exit_status $?' 4 times for the same directory > > (intermixed with other commands), suggesting that Tramp doesn't cache > > the result. Three times it issues `test -r ...' for the same > > directory, the source checkout root. Most other commands cannot be > > generically skipped by Tramp though, this would rather depend on > > Magit. > > Caches are problematic. They are limited to 10 seconds by default, did > you try to increase that number? Yes, `remote-file-name-inhibit-cache' is now 600 here. > And directories are also problematic for caches. As soon as something > changes there (creation or deletion of a file, for example), the cached > values of the directory must be flushed. Yeah, I suppose Tramp has no generic way to know that Magit issues reading commands. Can we devise a generic interface that would tell Tramp: "Commands within this block will not modify file system", e.g. with let-binding some variable? In general, it feels like Tramp flushes its caches too often or maybe doesn't even cache certain things at all. I.e. it's not about those 10 seconds (following your advice I have even increased that). It's that while serving one user-level command here (i.e. within 3 seconds at most), it can issue the same remote command several times, thus not reusing previous results. E.g. in the traces you have attached this can be seen. The following two commands repeat twice: | | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "\\readlink --canonicalize-missing /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") ... | | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "\\readlink --canonicalize-missing /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") and | | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "tramp_stat_file_attributes /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") ... | | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "tramp_stat_file_attributes /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") Paul On Tue, 26 Jul 2022 at 19:51, Michael Albinus wrote: > Paul Pogonyshev writes: > > Hi Paul, > > >> Combining stat and readlink into one remote command have even slowed > >> down the machinery. Likely, because it isn't needed always, but it > >> always consumes more time to compute both on the remote side, and to > >> read all the results. > > > > Well, that's hard to believe. I mean, it is understandable that > > `readlink' (whatever Elisp call results in that shell command) is not > > often needed, but how long can that take on a modern computer, 1 ms? > > It might be that we evaluate performance changes differently. I care > > more about worst cases (since they affect me directly, yeah) and not > > so much if Tramp becomes 1 ms slower "per user-visible operation" on > > average. > > As said, I live in a pretty good connected LAN. remote commands do not > result in heavy performance degradations, compared with the rest of > Elisp computing. > > > I tested it a bit now. Initially mentioned usecase > > (`insert-file-contents', but only a file part, not the whole file) > > appears to be considerably faster after the changes (hard to say, > > feels like 30-50% faster). > > Oh, good. In my environment it was something about 5%. > > > The connection log says that number of > > commands is 10 now, with the originally mentioned list heavily > > changed. However, there must still be space for improvement, e.g. `M-x > > occur tramp-send RET' suggests there are outright duplicated commands > > now: > > Pretty sure there's still place for improvements! > > > On the other hand, refreshing a remote-tracking Magit (Emacs Git > > interface) buffer doesn't feel any faster than before. Logs also > > suggest that number of commands that tramp send stays as before (43). > > Some commands are certainly excessive, e.g. it repeats `test -d [...] > > 2>/dev/null; echo tramp_exit_status $?' 4 times for the same directory > > (intermixed with other commands), suggesting that Tramp doesn't cache > > the result. Three times it issues `test -r ...' for the same > > directory, the source checkout root. Most other commands cannot be > > generically skipped by Tramp though, this would rather depend on > > Magit. > > Caches are problematic. They are limited to 10 seconds by default, did > you try to increase that number? VC related commands are also > problematic, Emacs tests different VC's for availability. It is always a > good idea to reduce the number of VC backends. If you completely trust > in magit, you shall deactivate Emacs' vc.el. Something like (setq > vc-handled-backends nil) should help. > > And directories are also problematic for caches. As soon as something > changes there (creation or deletion of a file, for example), the cached > values of the directory must be flushed. > > I propose we try step by step. That is, we investigate typical code > snippets, and see what Tramp does. Case by case. > > The Tramp debug buffer is a little bit noisy. So you could do > > (progn > (trace-function-background 'tramp-send-command) > (trace-function-background 'tramp-file-name-handler)) > > By this, only the calls of tramp-send-command (go remote) and > tramp-file-name-handler (any invocation of Tramp) are traced. The latter > is important to know, what has triggered a given remote command. > > Starting with your initial example > > (with-temp-buffer > (insert-file-contents "/ssh:detlef:.emacs" nil 100 nil)) > > I get the *trace-output* buffer as appended. Let's study this first, and > see, what could be done in order to improve this case. Obviously, most > of the commands are about the temporary file /tmp/tramp.qgnQ01, which is > superfluous. I'll check whether handling temporary files could be > handled better. > > When we're happy with this example, let's go to the next example. > > > Paul > > Best regards, Michael. > > PS: Next 2 or 3 days I'm kind of absent: my granddaughter will visit > us. Sorry, but you know: priorities :-) > > ====================================================================== > 1 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:.emacs" nil) > 1 <- tramp-file-name-handler: "/ssh:detlef:/home/albinus/.emacs" > ====================================================================== > 1 -> (tramp-file-name-handler insert-file-contents > "/ssh:detlef:/home/albinus/.emacs" nil 2 4 nil) > | 2 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/home/albinus/.emacs" nil) > | 2 <- tramp-file-name-handler: "/ssh:detlef:/home/albinus/.emacs" > | 2 -> (tramp-file-name-handler expand-file-name "tramp." > "/ssh:detlef:/tmp") > | 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp." > | 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/tramp." > "/tmp/") > | 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp." > | 2 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | 2 -> (tramp-file-name-handler write-region "" nil > #1="/ssh:detlef:/tmp/tramp.qgnQ01" nil silent #1# excl) > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-truename > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" localname nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" localname nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" nil nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:" > | | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "\\readlink --canonicalize-missing > /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") > | | | | 5 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" > nil "/tmp/tramp.qgnQ01" nil) "echo are you awake" t t) > | | | | 5 <- tramp-send-command: nil > | | | 4 <- tramp-send-command: 39 > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-symlink-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | | 5 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | | 6 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | | 6 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" > nil "/tmp/tramp.qgnQ01" nil) "tramp_stat_file_attributes /tmp/tramp.qgnQ01 > 2>/dev/null; echo tramp_exit_status $?") > | | | | | 6 <- tramp-send-command: 25 > | | | | 5 <- tramp-file-name-handler: nil > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-exists-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler file-locked-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler make-lock-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01" integer) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01" integer) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-acl "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-selinux-context > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: (nil nil nil nil) > | | 3 -> (tramp-file-name-handler file-name-nondirectory > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: "tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" nil nil) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 <- tramp-file-name-handler: "/ssh:detlef:" > | | 3 -> (tramp-file-name-handler lock-file > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler file-locked-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 -> (tramp-file-name-handler make-lock-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 <- tramp-file-name-handler: nil > | | | 4 <- tramp-file-name-handler: nil > | | | 4 -> (tramp-file-name-handler make-lock-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 <- tramp-file-name-handler: nil > | | | 4 -> (tramp-file-name-handler make-lock-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-modes > "/ssh:detlef:/tmp/tramp.qgnQ01" nofollow) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler file-name-nondirectory > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: "tramp.qgnQ01" > | | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "base64 -d -i >/tmp/tramp.qgnQ01 > <<'b03f0306a9a1e716a81252ccc4134b92' 2>/dev/null; echo tramp_exit_status > $?\nb03f0306a9a1e716a81252ccc4134b92") > | | 3 <- tramp-send-command: 21 > | | 3 -> (tramp-file-name-handler file-name-directory > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/" > | | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/" > | | 3 -> (tramp-file-name-handler directory-file-name "/ssh:detlef:/tmp/") > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp" > | | 3 -> (tramp-file-name-handler file-modes "/ssh:detlef:/tmp" nil) > | | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp" > nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp" > | | | 4 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/tmp") > | | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp" > nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp" > | | | | 5 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" > nil "/tmp" nil) "tramp_stat_file_attributes /tmp 2>/dev/null; echo > tramp_exit_status $?") > | | | | 5 <- tramp-send-command: 129 > | | | 4 <- tramp-file-name-handler: (t 30 0 0 (25305 58381 0 0) (25312 > 7412 0 0) (25312 7412 0 0) 135168 "drwxrwxrwt" t 3801089 (-1 . 2)) > | | 3 <- tramp-file-name-handler: 1023 > | | 3 -> (tramp-file-name-handler tramp-set-file-uid-gid > "/ssh:detlef:/tmp/tramp.qgnQ01" 1000 1000) > | | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "chown 1000:1000 /tmp/tramp.qgnQ01") > | | | 4 <- tramp-send-command: 1 > | | 3 <- tramp-file-name-handler: 1 > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" "~/") > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler set-file-acl > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" "~/") > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler set-file-selinux-context > "/ssh:detlef:/tmp/tramp.qgnQ01" (nil nil nil nil)) > | | 3 <- tramp-file-name-handler: nil > | | 3 -> (tramp-file-name-handler unlock-file > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler make-lock-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: nil > | 2 <- tramp-file-name-handler: nil > | 2 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/home/albinus/.emacs" nil) "dd bs=1 skip=2 if=/home/albinus/.emacs count=2 > of=/tmp/tramp.qgnQ01") > | 2 <- tramp-send-command: 72 > | 2 -> (tramp-file-name-handler file-local-copy > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 -> (tramp-file-name-handler file-truename > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" localname nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" localname nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-remote-p > "/ssh:detlef:/tmp/tramp.qgnQ01" nil nil) > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:" > | | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "\\readlink --canonicalize-missing > /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?") > | | | 4 <- tramp-send-command: 39 > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-symlink-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | | 5 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | | 6 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | | 6 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" > nil "/tmp/tramp.qgnQ01" nil) "tramp_stat_file_attributes /tmp/tramp.qgnQ01 > 2>/dev/null; echo tramp_exit_status $?") > | | | | | 6 <- tramp-send-command: 148 > | | | | 5 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) > (25312 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 . 2)) > | | | 4 <- tramp-file-name-handler: nil > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-name-nondirectory > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | 3 <- tramp-file-name-handler: "tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) (25312 > 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 . 2)) > | | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "base64 /dev/null; echo > tramp_exit_status $?") > | | 3 <- tramp-send-command: 26 > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-file-name-handler file-modes > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 -> (tramp-file-name-handler file-attributes > "/ssh:detlef:/tmp/tramp.qgnQ01") > | | | | 5 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | | 4 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) > (25312 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 . 2)) > | | 3 <- tramp-file-name-handler: 436 > | 2 <- tramp-file-name-handler: "/tmp/tramp.6ce5x9.qgnQ01" > | 2 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | 2 -> (tramp-file-name-handler file-directory-p > "/ssh:detlef:/tmp/tramp.qgnQ01") > | 2 <- tramp-file-name-handler: nil > | 2 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | 2 -> (tramp-file-name-handler delete-file > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 -> (tramp-file-name-handler expand-file-name > "/ssh:detlef:/tmp/tramp.qgnQ01" nil) > | | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01" > | | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil "detlef" nil > "/tmp/tramp.qgnQ01" nil) "rm -f /tmp/tramp.qgnQ01 2>/dev/null; echo > tramp_exit_status $?") > | | 3 <- tramp-send-command: 21 > | 2 <- tramp-file-name-handler: t > 1 <- tramp-file-name-handler: ("/ssh:detlef:/home/albinus/.emacs" 2) > --00000000000084b39605e533bc46 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> As said, I live in a pretty good connected LAN. remot= e commands do not
> result in heavy performance degradations, compare= d with the rest of
> Elisp computing.

Understood, but I propos= e to adopt a different benchmark: number of
remote commands.=C2=A0 As so= on as you are not in a LAN, even not when using
a particularly slow netw= ork, this becomes an order or two of magnitude
more important than every= thing else.=C2=A0 E.g. with slightly slower
commands or particularly ine= fficient Elisp you can make it 2-10 ms
slower for everyone.=C2=A0 But wi= th unoptimized command flow (i.e. more
remote commands) it can be 100-50= 0 ms slower, though not for everyone,
but people using this over non-LAN= .=C2=A0 I think in such cases extremes
are more important than the avera= ge.

> > On the other hand, refreshing a remote= -tracking Magit (Emacs Git
> > interface) buffer doesn't feel = any faster than before. Logs also
> > suggest that number of comma= nds that tramp send stays as before (43).
> > Some commands are ce= rtainly excessive, e.g. it repeats `test -d [...]
> > 2>/dev/nu= ll; echo tramp_exit_status $?' 4 times for the same directory
> &= gt; (intermixed with other commands), suggesting that Tramp doesn't cac= he
> > the result. Three times it issues `test -r ...' for the= same
> > directory, the source checkout root. Most other commands= cannot be
> > generically skipped by Tramp though, this would rat= her depend on
> > Magit.
>
> Caches are problematic. = They are limited to 10 seconds by default, did
> you try to increase = that number?

Yes, `remote-file-name-inhibit-cache' is now 600 he= re.

> And directories are also problematic for caches. As soon as= something
> changes there (creation or deletion of a file, for examp= le), the cached
> values of the directory must be flushed.

Yea= h, I suppose Tramp has no generic way to know that Magit issues
reading = commands.=C2=A0 Can we devise a generic interface that would tell
Tramp:= "Commands within this block will not modify file system",
e.g= . with let-binding some variable?

In general, it feels like Tramp fl= ushes its caches too often or maybe
doesn't even cache certain thing= s at all.=C2=A0 I.e. it's not about those
10 seconds (following your= advice I have even increased that).=C2=A0 It's
that while serving o= ne user-level command here (i.e. within 3 seconds
at most), it can issue= the same remote command several times, thus
not reusing previous result= s.

E.g. in the traces you have attached this can be seen.=C2=A0 The = following
two commands repeat twice:

| | | 4 -> (tramp-send-co= mmand (tramp-file-name "ssh" nil nil "detlef" nil "= ;/tmp/tramp.qgnQ01" nil) "\\readlink --canonicalize-missing /tmp/= tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?")
...
| |= | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil &qu= ot;detlef" nil "/tmp/tramp.qgnQ01" nil) "\\readlink --c= anonicalize-missing /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_statu= s $?")

and

| | | | | 6 -> (tramp-send-command (tramp-= file-name "ssh" nil nil "detlef" nil "/tmp/tramp.q= gnQ01" nil) "tramp_stat_file_attributes /tmp/tramp.qgnQ01 2>/d= ev/null; echo tramp_exit_status $?")
...
| | | | | 6 -> (tram= p-send-command (tramp-file-name "ssh" nil nil "detlef" = nil "/tmp/tramp.qgnQ01" nil) "tramp_stat_file_attributes /tm= p/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?")

Paul=

On Tue, 26 Jul 2022 at 19:51, Michael Albinus <michael.albinus@gmx.de> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l= eft:1px solid rgb(204,204,204);padding-left:1ex">Paul Pogonyshev <pogonyshev@gmail.com> writes:

Hi Paul,

>> Combining stat and readlink into one remote command have even slow= ed
>> down the machinery. Likely, because it isn't needed always, bu= t it
>> always consumes more time to compute both on the remote side, and = to
>> read all the results.
>
> Well, that's hard to believe. I mean, it is understandable that > `readlink' (whatever Elisp call results in that shell command) is = not
> often needed, but how long can that take on a modern computer, 1 ms? > It might be that we evaluate performance changes differently. I care > more about worst cases (since they affect me directly, yeah) and not > so much if Tramp becomes 1 ms slower "per user-visible operation&= quot; on
> average.

As said, I live in a pretty good connected LAN. remote commands do not
result in heavy performance degradations, compared with the rest of
Elisp computing.

> I tested it a bit now. Initially mentioned usecase
> (`insert-file-contents', but only a file part, not the whole file)=
> appears to be considerably faster after the changes (hard to say,
> feels like 30-50% faster).

Oh, good. In my environment it was something about 5%.

> The connection log says that number of
> commands is 10 now, with the originally mentioned list heavily
> changed. However, there must still be space for improvement, e.g. `M-x=
> occur tramp-send RET' suggests there are outright duplicated comma= nds
> now:

Pretty sure there's still place for improvements!

> On the other hand, refreshing a remote-tracking Magit (Emacs Git
> interface) buffer doesn't feel any faster than before. Logs also > suggest that number of commands that tramp send stays as before (43).<= br> > Some commands are certainly excessive, e.g. it repeats `test -d [...]<= br> > 2>/dev/null; echo tramp_exit_status $?' 4 times for the same di= rectory
> (intermixed with other commands), suggesting that Tramp doesn't ca= che
> the result. Three times it issues `test -r ...' for the same
> directory, the source checkout root. Most other commands cannot be
> generically skipped by Tramp though, this would rather depend on
> Magit.

Caches are problematic. They are limited to 10 seconds by default, did
you try to increase that number? VC related commands are also
problematic, Emacs tests different VC's for availability. It is always = a
good idea to reduce the number of VC backends. If you completely trust
in magit, you shall deactivate Emacs' vc.el. Something like (setq
vc-handled-backends nil) should help.

And directories are also problematic for caches. As soon as something
changes there (creation or deletion of a file, for example), the cached
values of the directory must be flushed.

I propose we try step by step. That is, we investigate typical code
snippets, and see what Tramp does. Case by case.

The Tramp debug buffer is a little bit noisy. So you could do

(progn
=C2=A0 (trace-function-background 'tramp-send-command)
=C2=A0 (trace-function-background 'tramp-file-name-handler))

By this, only the calls of tramp-send-command (go remote) and
tramp-file-name-handler (any invocation of Tramp) are traced. The latter is important to know, what has triggered a given remote command.

Starting with your initial example

(with-temp-buffer
=C2=A0 (insert-file-contents "/ssh:detlef:.emacs" nil 100 nil))
I get the *trace-output* buffer as appended. Let's study this first, an= d
see, what could be done in order to improve this case. Obviously, most
of the commands are about the temporary file /tmp/tramp.qgnQ01, which is superfluous. I'll check whether handling temporary files could be
handled better.

When we're happy with this example, let's go to the next example.
> Paul

Best regards, Michael.

PS: Next 2 or 3 days I'm kind of absent: my granddaughter will visit us. Sorry, but you know: priorities :-)

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:.emacs&= quot; nil)
1 <- tramp-file-name-handler: "/ssh:detlef:/home/albinus/.emacs&quo= t;
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1 -> (tramp-file-name-handler insert-file-contents "/ssh:detlef:/ho= me/albinus/.emacs" nil 2 4 nil)
| 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/home= /albinus/.emacs" nil)
| 2 <- tramp-file-name-handler: "/ssh:detlef:/home/albinus/.emacs&q= uot;
| 2 -> (tramp-file-name-handler expand-file-name "tramp." &quo= t;/ssh:detlef:/tmp")
| 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp."
| 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/= tramp." "/tmp/")
| 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp."
| 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/= tramp.qgnQ01" nil)
| 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01"= ;
| 2 -> (tramp-file-name-handler write-region "" nil #1=3D"= ;/ssh:detlef:/tmp/tramp.qgnQ01" nil silent #1# excl)
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-truename "/ssh:detlef:/tmp/t= ramp.qgnQ01")
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" localname nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01"
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" localname nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01"
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" nil nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:"
| | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil = "detlef" nil "/tmp/tramp.qgnQ01" nil) "\\readlink = --canonicalize-missing /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_st= atus $?")
| | | | 5 -> (tramp-send-command (tramp-file-name "ssh" nil ni= l "detlef" nil "/tmp/tramp.qgnQ01" nil) "echo are = you awake" t t)
| | | | 5 <- tramp-send-command: nil
| | | 4 <- tramp-send-command: 39
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-symlink-p "/ssh:detlef:/tm= p/tramp.qgnQ01")
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | | 5 -> (tramp-file-name-handler file-attributes "/ssh:detlef:= /tmp/tramp.qgnQ01")
| | | | | 6 -> (tramp-file-name-handler expand-file-name "/ssh:detl= ef:/tmp/tramp.qgnQ01" nil)
| | | | | 6 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgn= Q01"
| | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil = nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "tramp_s= tat_file_attributes /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_statu= s $?")
| | | | | 6 <- tramp-send-command: 25
| | | | 5 <- tramp-file-name-handler: nil
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-exists-p "/ssh:detlef:/tmp/t= ramp.qgnQ01")
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler file-locked-p "/ssh:detlef:/tmp/t= ramp.qgnQ01")
| | | 4 -> (tramp-file-name-handler make-lock-file-name "/ssh:detle= f:/tmp/tramp.qgnQ01")
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/tmp= /tramp.qgnQ01" integer)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/tmp= /tramp.qgnQ01" integer)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-acl "/ssh:detlef:/tmp/tramp.= qgnQ01")
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-selinux-context "/ssh:detlef= :/tmp/tramp.qgnQ01")
| | 3 <- tramp-file-name-handler: (nil nil nil nil)
| | 3 -> (tramp-file-name-handler file-name-nondirectory "/ssh:detl= ef:/tmp/tramp.qgnQ01")
| | 3 <- tramp-file-name-handler: "tramp.qgnQ01"
| | 3 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp/t= ramp.qgnQ01" nil nil)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | 3 <- tramp-file-name-handler: "/ssh:detlef:"
| | 3 -> (tramp-file-name-handler lock-file "/ssh:detlef:/tmp/tramp= .qgnQ01")
| | | 4 -> (tramp-file-name-handler file-locked-p "/ssh:detlef:/tmp= /tramp.qgnQ01")
| | | | 5 -> (tramp-file-name-handler make-lock-file-name "/ssh:det= lef:/tmp/tramp.qgnQ01")
| | | | 5 <- tramp-file-name-handler: nil
| | | 4 <- tramp-file-name-handler: nil
| | | 4 -> (tramp-file-name-handler make-lock-file-name "/ssh:detle= f:/tmp/tramp.qgnQ01")
| | | 4 <- tramp-file-name-handler: nil
| | | 4 -> (tramp-file-name-handler make-lock-file-name "/ssh:detle= f:/tmp/tramp.qgnQ01")
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-modes "/ssh:detlef:/tmp/tram= p.qgnQ01" nofollow)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/t= mp/tramp.qgnQ01")
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler file-name-nondirectory "/ssh:detl= ef:/tmp/tramp.qgnQ01")
| | 3 <- tramp-file-name-handler: "tramp.qgnQ01"
| | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil &q= uot;detlef" nil "/tmp/tramp.qgnQ01" nil) "base64 -d -i = >/tmp/tramp.qgnQ01 <<'b03f0306a9a1e716a81252ccc4134b92' 2&= gt;/dev/null; echo tramp_exit_status $?\nb03f0306a9a1e716a81252ccc4134b92&q= uot;)
| | 3 <- tramp-send-command: 21
| | 3 -> (tramp-file-name-handler file-name-directory "/ssh:detlef:= /tmp/tramp.qgnQ01")
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/"
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/"
| | 3 -> (tramp-file-name-handler directory-file-name "/ssh:detlef:= /tmp/")
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp"
| | 3 -> (tramp-file-name-handler file-modes "/ssh:detlef:/tmp"= ; nil)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp"
| | | 4 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/t= mp")
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp"
| | | | 5 -> (tramp-send-command (tramp-file-name "ssh" nil ni= l "detlef" nil "/tmp" nil) "tramp_stat_file_attrib= utes /tmp 2>/dev/null; echo tramp_exit_status $?")
| | | | 5 <- tramp-send-command: 129
| | | 4 <- tramp-file-name-handler: (t 30 0 0 (25305 58381 0 0) (25312 7= 412 0 0) (25312 7412 0 0) 135168 "drwxrwxrwt" t 3801089 (-1 . 2))=
| | 3 <- tramp-file-name-handler: 1023
| | 3 -> (tramp-file-name-handler tramp-set-file-uid-gid "/ssh:detl= ef:/tmp/tramp.qgnQ01" 1000 1000)
| | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil = "detlef" nil "/tmp/tramp.qgnQ01" nil) "chown 1000:= 1000 /tmp/tramp.qgnQ01")
| | | 4 <- tramp-send-command: 1
| | 3 <- tramp-file-name-handler: 1
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" "~/")
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler set-file-acl "/ssh:detlef:/tmp/tr= amp.qgnQ01" nil)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" "~/")
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler set-file-selinux-context "/ssh:de= tlef:/tmp/tramp.qgnQ01" (nil nil nil nil))
| | 3 <- tramp-file-name-handler: nil
| | 3 -> (tramp-file-name-handler unlock-file "/ssh:detlef:/tmp/tra= mp.qgnQ01")
| | | 4 -> (tramp-file-name-handler make-lock-file-name "/ssh:detle= f:/tmp/tramp.qgnQ01")
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: nil
| 2 <- tramp-file-name-handler: nil
| 2 -> (tramp-send-command (tramp-file-name "ssh" nil nil &quo= t;detlef" nil "/home/albinus/.emacs" nil) "dd bs=3D1 sk= ip=3D2 if=3D/home/albinus/.emacs count=3D2 of=3D/tmp/tramp.qgnQ01") | 2 <- tramp-send-command: 72
| 2 -> (tramp-file-name-handler file-local-copy "/ssh:detlef:/tmp/t= ramp.qgnQ01")
| | 3 -> (tramp-file-name-handler file-truename "/ssh:detlef:/tmp/t= ramp.qgnQ01")
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" localname nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01"
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" localname nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/tmp/tramp.qgnQ01"
| | | 4 -> (tramp-file-name-handler file-remote-p "/ssh:detlef:/tmp= /tramp.qgnQ01" nil nil)
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:"
| | | 4 -> (tramp-send-command (tramp-file-name "ssh" nil nil = "detlef" nil "/tmp/tramp.qgnQ01" nil) "\\readlink = --canonicalize-missing /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_st= atus $?")
| | | 4 <- tramp-send-command: 39
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-symlink-p "/ssh:detlef:/tm= p/tramp.qgnQ01")
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | | 5 -> (tramp-file-name-handler file-attributes "/ssh:detlef:= /tmp/tramp.qgnQ01")
| | | | | 6 -> (tramp-file-name-handler expand-file-name "/ssh:detl= ef:/tmp/tramp.qgnQ01" nil)
| | | | | 6 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgn= Q01"
| | | | | 6 -> (tramp-send-command (tramp-file-name "ssh" nil = nil "detlef" nil "/tmp/tramp.qgnQ01" nil) "tramp_s= tat_file_attributes /tmp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_statu= s $?")
| | | | | 6 <- tramp-send-command: 148
| | | | 5 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) = (25312 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 = . 2))
| | | 4 <- tramp-file-name-handler: nil
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-name-nondirectory "/ssh:detl= ef:/tmp/tramp.qgnQ01")
| | 3 <- tramp-file-name-handler: "tramp.qgnQ01"
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/tmp= /tramp.qgnQ01")
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | 3 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) (253= 12 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 . 2)= )
| | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil &q= uot;detlef" nil "/tmp/tramp.qgnQ01" nil) "base64 </t= mp/tramp.qgnQ01 2>/dev/null; echo tramp_exit_status $?")
| | 3 <- tramp-send-command: 26
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-file-name-handler file-modes "/ssh:detlef:/tmp/tram= p.qgnQ01" nil)
| | | 4 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/= tmp/tramp.qgnQ01" nil)
| | | 4 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&= quot;
| | | 4 -> (tramp-file-name-handler file-attributes "/ssh:detlef:/t= mp/tramp.qgnQ01")
| | | | 5 -> (tramp-file-name-handler expand-file-name "/ssh:detlef= :/tmp/tramp.qgnQ01" nil)
| | | | 5 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ0= 1"
| | | 4 <- tramp-file-name-handler: (nil 1 1000 1000 (25312 7412 0 0) (2= 5312 7412 0 0) (25312 7412 0 0) 2 "-rw-rw-r--" nil 3821258 (-1 . = 2))
| | 3 <- tramp-file-name-handler: 436
| 2 <- tramp-file-name-handler: "/tmp/tramp.6ce5x9.qgnQ01"
| 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/= tramp.qgnQ01" nil)
| 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01"= ;
| 2 -> (tramp-file-name-handler file-directory-p "/ssh:detlef:/tmp/= tramp.qgnQ01")
| 2 <- tramp-file-name-handler: nil
| 2 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tmp/= tramp.qgnQ01" nil)
| 2 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01"= ;
| 2 -> (tramp-file-name-handler delete-file "/ssh:detlef:/tmp/tramp= .qgnQ01" nil)
| | 3 -> (tramp-file-name-handler expand-file-name "/ssh:detlef:/tm= p/tramp.qgnQ01" nil)
| | 3 <- tramp-file-name-handler: "/ssh:detlef:/tmp/tramp.qgnQ01&qu= ot;
| | 3 -> (tramp-send-command (tramp-file-name "ssh" nil nil &q= uot;detlef" nil "/tmp/tramp.qgnQ01" nil) "rm -f /tmp/tr= amp.qgnQ01 2>/dev/null; echo tramp_exit_status $?")
| | 3 <- tramp-send-command: 21
| 2 <- tramp-file-name-handler: t
1 <- tramp-file-name-handler: ("/ssh:detlef:/home/albinus/.emacs&qu= ot; 2)
--00000000000084b39605e533bc46--