6

Recently nano has started to be very slow when editing files over ssh. It's particularly slow when editing large files with syntax highlighting.

It's most noticeable when yanking lines. There can sometimes be a delay of well over a second while yanking lines (they eventually do get yanked but this often means I end up grabbing more lines than I intended once it refreshes the screen).

I do like syntax highlighting but I'm willing to forgo it if this means I can get back to normal editing speeds again, but this wasn't an issue in the past and I'm wondering if there is some configuration changes I can look into to improve the response time.

Jordan Reiter
  • 1,290
  • 4
  • 20
  • 40
  • Are you certain that this is an issue with nano and not with ssh or your overall connection? Did you try activating SSH compression? (ssh -C) – niglesias Apr 11 '18 at 15:11
  • I don't think so. Everything else responds quickly and I don't notice a slowdown in vi. – Jordan Reiter Apr 11 '18 at 16:36
  • Let me insist with this: try connecting with "ssh -C", perhaps the screen drawing inside nano takes much more traffic than vi – niglesias Apr 12 '18 at 18:26
  • Sorry. Finally got around to trying this. Even slower than without the `-C` if that's possible. – Jordan Reiter May 01 '18 at 16:06
  • Are both machines on the same network? Perhaps it has something to do with MTU settings on the network interface (it's happened to me). Fo instance, does a long directory listing work as expected? Try 'ls -l /usr/bin' – niglesias May 02 '18 at 19:46
  • Try running `nano` inside a terminal multiplexer such as [`byobu`](http://byobu.co/) or [`tmux`](https://en.wikipedia.org/wiki/Tmux). – dragon Dec 01 '18 at 19:05
  • 1
    What operating system and version is the server (where nano is running) using? What version of nano? It's a long shot, but there have been bugs in specific distribution packages (e.g. Rasbian) which cause nano to slow down as you describe. – Jesse Scherer Dec 17 '18 at 21:46

1 Answers1

0

While you are editing your file in Nano run ping from your machine to the machine you are connected to with SSH.

In the ping's output look for packet loss, if you have packet loss on the line your Nano session will be unstable.

If you have packet loss, you will need to investigate the cause with the network connectivity provider.

AAber
  • 161
  • 1
  • 4