But both TCP connections are to localhost so, you get 64K MTU unlike 1500/9000 over a network connection. Also, blocking / polling will be much quicker locally (in the order of microseconds not milliseconds minimum for over the Internet).
And lastly you can host it on port 443 so it will look similar to a HTTP connection externally.
It's not anywhere near as bad as you conjecture.