13

I am using the Macports flavor of Emacs on OSX Yosemite, and have looked through every thread here on Tramp being slow without any solution.

Tramp is usable, but there is about a 100ms delay between every action. It's not a problem on the server's end because this delay does not exist if I just use terminal/iTerm to just ssh to the same server.

I thought maybe the problem was limited to editing files, but it turns out it's ubiquitous. Whether I'm using just a remote shell, or just pressing M-x (with helm) it's all delayed.

I've tried ssh, scp, and rsync as methods for connecting without any solution. Also have tried the ControlMaster auto without any effect.

Has anyone else had this problem, and was able to solve it?

  • Tried to find a something, this answer, is the only thing close to an helpful answer :\ – Nsukami _ Oct 21 '15 at 2:00
  • 2
    Tramp has extended logging facilities. Apply (setq tramp-verbose 6) and rerun your tests. There will be an exhaustive Tramp debug buffer, every single entry starts with a timestamp. Go through this buffer following the (6) entries, they are the comands sent remotely, and the output from the remote shell. Check, whether there are obvious delays. Btw, which Tramp version are you using? Check it with C-h v tramp-version. – Michael Albinus Oct 21 '15 at 7:49
  • For helm-tramp, github.com/masasam/… – Peter Becich Apr 8 at 16:26
14

Turns out it was projectile that was causing the problems. As soon as I disabled projectile-mode TRAMP was buttery smooth and I began to understand the hype behind it.

Hopefully this helps out someone else who has exhausted all other options.

Another solution I found if you don't want to disable projectile constantly is to put this command in your init.el

(setq projectile-mode-line "Projectile")

Turns out all the lag was coming from projectile trying to calculate what to put as the project name in the mode line. This isn't an important feature at all to me so you can just set it to say "Projectile"

  • How did you debug this? I don't think it's projectile slowing my TRAMP down, but I'm not 100% sure yet. – Adam Spiers Mar 16 '16 at 2:46
  • 1
    @AdamSpiers I just tried literally everything until I found out. If you want to do it the right way, you can try using (setq tramp-verbose 6) like another comment suggested. – m0meni Mar 16 '16 at 2:52
  • I already had that set to 7, and also profiled via elp-*. Difficult to understand the results though. – Adam Spiers Mar 16 '16 at 13:09
  • This issue is reported many times on projectile issue list. It seems that commit 323fb8.solved it. I had this issue for years but since I upgraded to projectile 20171102.55, it works well. – marcz Nov 2 '17 at 16:58
3

I have also found the solutions on the tramp FAQ that address speeding tramp up to work pretty well.

From the page, here is what I added to my configuration:

(setq remote-file-name-inhibit-cache nil)
(setq vc-ignore-dir-regexp
      (format "%s\\|%s"
                    vc-ignore-dir-regexp
                    tramp-file-name-regexp))
(setq tramp-verbose 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.