3 ms·
I really wish QtNetwork was better. I recently went and had to replace QtNetwork with our own event loop because it is extremely unreliable on Windows. The only
by Jasper_ 9y ago
I really wish QtNetwork was better. I recently went and had to replace QtNetwork with our own event loop because it is extremely unreliable on Windows. The only mention of this is a footnote in the API docs:
http://doc.qt.io/qt-5/qabstractsocket.html#waitForBytesWritten http://doc.qt.io/qt-5/qabstractsocket.html#waitForBytesWritt...
- ambrop7 9y agoWhy would you use waitForBytesWritten if you want an event loop? Just do as the note says.
- justinclift 9y agoYeah. It also turns out that just having a Qt application running on a computer can tank network latency for all applications on the computer: https://bugreports.qt.io/browse/QTBUG-40332 https://bugreports.qt.io/browse/QTBUG-40332 There is a workaround, but developers have to know about it first. And it's such an unexpected and weird behaviour that 99% of developers don't. This was our fix (1 line of code), in case that helps anyone: https://github.com/sqlitebrowser/sqlitebrowser/commit/73946400c32d1f7cfcd4672ab0ab3f563eb84f4e https://github.com/sqlitebrowser/sqlitebrowser/commit/739464...
- nly 9y agoYup, i work on software with a Qt GUI and it took us ages to figure out why our daemon (no Qt dependencies) would experience latency when the GUI was open. For Windows users we now put this var in to global environment via our installer, and probably break other software in the process.
- justinclift 9y ago> ... and probably break other software in the process. You might also be fixing it for some too, if they're running other Qt applications. :)