PowerShell and bash smoother on remote host

1

This is an interesting one, I have the same phenomenon with both PowerShell and bash (Linux under WSL) on Windows 10 Pro.

If I start a shell (either) and run commands that update the screen, E.g.

While(1) {ps | sort -des cpu | select -f 15 | ft -a; sleep 1; cls}

or a bash script that uses tput and echo to redraw the screen, if it runs on the local machine, it flashes and blanks and looks horrible.

If I remote onto another Windows machine or ssh onto a remote Linux host, the same scripts run a lot smoother, there is little or no flashing, the response to key presses is faster and it is generally a better experience…

The above example, run locally blanks the window (cls at the end), pauses, then redraws the window. On the remote host, the blanked window is not shown, the list of processes is simply overwritten, which looks a lot better. It is as if there is a slight pause, locally, before the window is redrawn, whereas remotely it is redrawn so fast, that the cls is never seen.

Surely, if the commands are running locally, it should provide a more smooth experience than running them remotely?

(the above command is similar to Linux top, it displays the top 15 processes, by CPU usage, every second)

Post Reply