WiFi Library Inefficiencies?

PaulS:
Is the issue with the String class? Try a char array, and sprintf() to create a string, instead.

That code fragment does look very similar to the test case that demonstrates the String bug, and the symptoms are also very similar.