I have a <script></script> within the "main" index.html file which opens a TCP connection to a server on localhost.
I am then using the Dev console to write to this socket to measure RTT on localhost.
It's very slow, around 400ms compared to a standalone Node script which is around 1ms.
Is there anything I could be doing wrong? Is this a side-effect of running the Node code within the window and dev tools context?
Would "node-main" be faster? Would I still be able to call functions in it using the dev tools?