Moderator: igrr
Did you figured out which version your are using, because the issue of the old version was like flush() been called on every print(). You can find the version number by looking at the folder names in ~/.arduino15/packages/esp8266/hardware/esp8266/. If you see more than one folder there, you have a mix of several versions. Delete all old ones, except the latest one, such as 1.6.5-947-g39819f0.
BTW, I've done a small test I've done 2 months ago when facing the issue, and the bug didn't came back in version using 1.6.5-947-g39819f0. This code is printed over telnet within 2 seconds :
for (int i = 0; i < 1000; i++) {
String str = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Line #" + String(i);
client.println(str);
}
Had a similar problem with HTTP post headers being printed one by one to the client. The printing took way too long (over 5 seconds), although the amount of data was limited. Upon further investigation it turned out that it was always the last client.println statement that took the longest (approx. 5 seconds as opposed to a dozen or so milliseconds for other prints). That was the case even when it contained a minimal portion of the whole POST request, or, for that matter, was empty. It was also independent of the amout of data (I suspected buffer overflow and limited the amount of data being printed).
What helped was to use client.print() instead of client.println() for the last portion. Then the duration of the last print was the same as the previous ones.
I'm new to this and this may be something obvious but I would be curious to hear in case anyone has an explanation to this.
I am using vanilla ESP-12 over the 1.6.5 Arduino IDE with 1.6.5-947 package.
For all peoples I've help about this issue, they had older versions sitting around ...