Delay in TCP/IP communication

Lines like these are going to freeze your UI. The sleep is especially bad because your UI will freeze for 15 seconds every time on that line.

You should get a packet capture with Wireshark. See if there's any delay between your button press and the request being sent, and between the request and response.

2 Likes