Oasn, very often performance problems in QTcpSocket are caused by one of the following
- Not reading (QTcpSocket will reallocate to grow its internal buffer)
- Reading with the QByteArray functions (a new bytearray is allocated for each packet)
- Running network code in the same thread as intensive GUI code (a progress bar will prevent the socket from being read from while continuously drawing itself, which again causes the socket buffer to fill up and start rejecting packets)




Reply With Quote
Bookmarks