- Tue Apr 21, 2015 6:12 am
#15186
martinayotte wrote:I saw this latency is with any WifiClient.print(), println() or write().
So, personally, I'm concatenating as much as I can into a single String object, and then send the whole thing using client.print(str) ...
Yes. In fact, according to some further tests I did, it appears to be TWICE as bad with .println(); my tests show a 125ms latency with .print() and .write(), but a 250ms latency with .println().
So, it's TWICE as fast to do client.print(myString + "\n") as it is to do client.println(myString). Yuck!
I haven't looked into the code, but I imagine that .println() is simply calling a .print() on the original input string, then a second .print("\n").