the 3rd bullet-point doesn't start until all the many, available incoming data packets have been buffered
Are you using a high baud rate, or is this still at 115200 baud?
It looks to me like it starts as soon as data starts being received (so it doesn't have to have go to the end of an IPD packet). However it tries to be 'up to date' with the characters coming in from the UART before it moves on. It could be Espruino's handling of input data (rather than anything network-related) that's causing problems.
For example it currently does:
var limit = 128;
while (hasInputCharacters() && limit--) {
var data = "";
while (data += popInputCharactersForDevice(SERIAL1));
handleInputCharacters(data);
}
But I imagine what could happen is if characters keep coming in, it calls javascript with something a bit like:
"lotsofdatalotsofdatalotsofdatalotsofdatalotsofdatalotsofdatalotsofdata"
"l" // by the time this is processed, another character has come in
"o" // and so on
"t"
"s"
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.
Are you using a high baud rate, or is this still at 115200 baud?
It looks to me like it starts as soon as data starts being received (so it doesn't have to have go to the end of an IPD packet). However it tries to be 'up to date' with the characters coming in from the UART before it moves on. It could be Espruino's handling of input data (rather than anything network-related) that's causing problems.
For example it currently does:
But I imagine what could happen is if characters keep coming in, it calls javascript with something a bit like: