3 ms·
Every time you save your edits Tramp makes a new connection to the remote server, it's slow(1sec vs 1ms) and becomes annoying waiting for the save all the time.
by ithrow 5y ago
Every time you save your edits Tramp makes a new connection to the remote server, it's slow(1sec vs 1ms) and becomes annoying waiting for the save all the time. For doing quick edits it doesn't matter but for doing dev all day it does.
- hibbelig 5y agoTramp offers different "connection methods" with different characteristics. For example, the scp connection method uses scp to copy files to/from the remote machine, and this implies a new ssh connection each time. But the ssh connection method transfers the files inline, using base64 or uu encoding, and then you do not need a new connection each time the file is read or written.
- kstrauser 5y agoConfiguring OpenSSH's ControlMaster setting here makes an enormous difference. Summary: it keeps a connection open for a while in case you want to connect to the same machine again. If you do, it reuses that connection so the new one is nearly instant.
- Scarbutt 5y agoI'll give it a try, thanks.
- kstrauser 5y agoExamples, starting with a new connection to a server I haven't accessed recently: ᐅ time ssh myserver exit Executed in 1.66 secs Now visiting it again uses the existing connection: ᐅ time ssh mastodon exit Executed in 55.89 millis
- kstrauser 5y ago(Assume the hostname is identical in both cases. I edited one and not the other. Oops!)