Skip to content

vagrant-tramp really slow when working on codebases inside a VM #41

@mspinelli

Description

@mspinelli

Description :octocat:

Running spacemacs on host connected to a VM containing code files via vagrant-trap is very slow and auto-complete doesn't work (like it does if the code is on the host instead of the VM -- using python)

Reproduction guide 🪲

  • Start Emacs
  • Add the following to dotspacemacs/user-config ()
  (defun connect-vagrant ()
    (interactive)
    (dired "/ssh:vagrant@localhost#2222:/"))
  • SPC f e R
  • M-x connect-vagrant
  • navigate to a file on the VM
  • starting coding

Observed behaviour: 👀 💔
As you type and short pause between words or symbols kicks off a bunch of vagrant-tramp opening connection and sending ssh operations (See messages below). This makes typing really slow as it interrupts and prevents you from doing anything in the meantime. Also auto complete does not work.

Expected behaviour: ❤️ 😄
Coding should not be interrupted and auto-complete should work.

System Info 💻

  • OS: gnu/linux
  • Emacs: 26.1
  • Spacemacs: 0.200.13
  • Spacemacs branch: master (rev. c7a103a77)
  • Graphic display: t
  • Distribution: spacemacs
  • Editing style: vim
  • Completion: helm
  • Layers:
(html javascript auto-completion c-c++ emacs-lisp git vagrant ruby themes-megapack
      (python :variables python-test-runner 'pytest)
      ess colors markdown org
      (shell :variables shell-default-height 30 shell-default-position 'bottom)
      spell-checking syntax-checking html yaml version-control)
  • System configuration features: XPM JPEG TIFF GIF PNG SOUND DBUS GSETTINGS NOTIFY GNUTLS FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 THREADS

Messages 🐾

Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...
Tramp: Sending password
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done
Directory has changed on disk; type g to update Dired [3 times]
Tramp: Inserting ‘/ssh:vagrant@localhost#2222:/sync/path/hidden/backend/manage.py’...
Tramp: Encoding remote file ‘/ssh:vagrant@localhost#2222:/sync/path/hidden/backend/manage.py’ with ‘base64 <%s’...done
Tramp: Decoding local file ‘/tmp/tramp.bC8AqM.py’ with ‘base64-decode-region’...done
Tramp: Inserting ‘/ssh:vagrant@localhost#2222:/sync/path/hidden/backend/manage.py’...done
git-gutter+-refresh: Wrong type argument: arrayp, (tramp-file-name "ssh" "vagrant" nil "localhost" "2222" "/sync/path/hidden/backend/manage.py" nil)
Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -q -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done
auto trimmed 0 chars
Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -q -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done
user-error: No further undo information [2 times]
auto trimmed 0 chars
Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -q -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done
Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -q -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done
Tramp: Opening connection for vagrant@localhost using ssh...
Tramp: Sending command ‘exec ssh -q -l vagrant -p 2222 -o ControlMaster=auto -o ControlPath='tramp.%C' -o ControlPersist=no -e none localhost’
Tramp: Waiting for prompts from remote shell...done
Tramp: Found remote shell prompt on ‘localhost’
Tramp: Opening connection for vagrant@localhost using ssh...done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions