And you notice a delay over both USB and TCPIP? I'm out of the office at the moment but i believe the output buffer is 128 on the WiFi, and what you're sending seems a lot less than that?
One thing you could try is using setBusyIndicator so you get an idea of whether Espruino is executing code for a serious amount of time at any point?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
And you notice a delay over both USB and TCPIP? I'm out of the office at the moment but i believe the output buffer is 128 on the WiFi, and what you're sending seems a lot less than that?
One thing you could try is using setBusyIndicator so you get an idea of whether Espruino is executing code for a serious amount of time at any point?