One of the reasons is, that Tramp opens first a shell on the remote
host, performs sanity checks, and runs the command after that. Well, I
cannot change this in general; the sanity checks have been added due to
feedback from users.
It'd be great to have the list of checks that are done and the reasons to see if they still make sense nowadays. Maybe these checks were added to safe-guard against silly terminals/implementations but can be ignored in recent times.
One idea to change the situation is, to remove all sanity checks from
This would improve performance significantly. The drawback is, that
Tramp does not perform convenience checks, like password handling.
start-file-process would not be changed, and it behaves like before.
I'm not clear on make-process vs start-file-process usage, but I assume the former is used by API developers and the later is called by TRAMP, so we still get the sanity checks for normal TRAMP usage?
If you ask _my_ preferences I'd remove the sanity checks and require sane terminals, maybe offer some tramp-sane-terminal-p that could run the sanity checks for debugging. That or cache the sanity checks so you only run them once on the initial connection but never later on. I understand my position is probably not everyone's position tho :-)