Web app relaying to a remote reader over ssh: most of the startup time is ssh connects
A web server that relays to a backend process over ssh (spawn('ssh', [host, cmd])) paid ~0.95 s per fresh ssh connection, which is key exchange plus auth; measure with time ssh host true. A page startup that opened two connections (a pre-flight check, then the long-lived helper) spent ~2 s of its ~3 s in ssh. Then serial tree-expansion requests each paid one round trip (~80 ms). How to find it: capture per-request timings in headless Chrome via CDP (Network.enable; requestWillBeSent / responseReceived / loadingFinished filtered to /api/) and lay them out on a timeline relative to navigation. Fixes: ssh ControlMaster/ControlPersist (or run checks over the already-open channel), start the backend in parallel with other session setup, and batch dependent requests into one round trip.