2 ms·
- My preference is to run my IDE or editor on the remote, and only run a thin client (RDP > X11, mosh > ssh) on the local. Because I’m happy in nvim, I would ju
by jitl 5y ago
- My preference is to run my IDE or editor on the remote, and only run a thin client (RDP > X11, mosh > ssh) on the local. Because I’m happy in nvim, I would just install nvim and my dot files on the remote and access it via mosh/tmux. But this is not for everyone; if you’re doing Java an IDE is a must. So, try RDP or X11 forwarding for those.
If you can’t install software on the remote (or you can’t install a GUI stack), read on:
- Most IDEs like Intellij can be configured to do all their execution on a remote over SSH. I worked this way using PyCharm for my student job at UC Berkeley in 2012 and it worked great.
- SSHFS is okay but not great because of slowness. It’s fine for editing but sucks for running interpreted code locally. So, try to do all execution on the remote.
- VS Code has handy support of editing on a remote without needing SSHFS
- if permitted, a two-way file sync solution like Unison or Mutagen gets you native file system performance on the local. We used Unison for local editing with remote execution for Airbnb’s Ruby codebase for several years (2015-2018+). But it’s more fiddly to work with than SSHFS.
- paskozdilar 5y agoSSHFS caches reads on my machine. Here's a sequential timing of sha256sum operation on a ~10MiB file: $ time sha256sum file c2359f8b63dfef9f50e62b2e7b4ef2613c290c3a1ffa135cfa255b14eafd3ffb file real 0m5,205s user 0m0,127s sys 0m0,011s $ time sha256sum file c2359f8b63dfef9f50e62b2e7b4ef2613c290c3a1ffa135cfa255b14eafd3ffb file real 0m0,221s user 0m0,093s sys 0m0,004s That should be enough to prevent slowness for interpreted code, since textual files are small anyway. SSHFS only needs to send edited files to the remote machine.
- mekster 5y agoNo one wants to open up project files over sshfs... Do a search on all files and you'll need a break. Code parsing definitely can take forever using JetBrains.
- paskozdilar 5y agoDepends on the project size. My average project size ~12MiB - 19MiB when using vendor/ directory with Golang. It's less than a minute wait on a 1MiB connection to load the whole directory and cache it. For compiled languages, binary size would be a problem so it's probably smart to write the compilation output somewhere outside sshfs-mounted directory and run it locally. For interpreted languages generally it shouldn't be a problem since everything is in memory. Python does write stuff in __pycache__/, but in my experience it's rarely more than a few hundred kilobytes per cache directory; it's also possible to turn off writing __pycache__/ with PYTHONDONTWRITEBYTECODE=1.