something i noticed while debugging tramp perf half the lag isn't tramp, it's elisp codepaths calling sync ops assuming they're cheap. i saw vc-git-root firing on every bufferlist switch because some mode wants to update a badge or refresh a modeline. none of it's aware that the path is remote
That's exactly it. TRAMP itself works fine, but some packages that are only tested on local machines use a bunch of shell calls that are not really needed (i.e. They could cache the result).