I use QNetworkAccessManager and related classes to stream texture and geometry data from an internet server. Using this data the application renders an interactive 3D-scene. When a button is pressed I use a QTimer at 10 ms interval to update the scene. There is only one thread, besides possible internal threads of QNetworkAccessManager. It is intended to get a smooth movement, while geometry and textures popup as soon as they are available.
To speedup the slow download from the server I'm using QNetworkDiskCache. However, when using a directory on my hard disk for caching I experience heavy lags every few seconds. This lags have a duration from 0.5 to 1 second. While I'm not sure about this, I assume this is caused by blocking disk accesses in my primary thread. To test the hypothesis I created a RAM drive and used it as cache location. Movement and animation are still not smooth, but these heavy lags are gone. (QNetworkDiskCache is the only location where I'm doing frequent disk accesses)
=> Does QNetworkDiskCache do a blocking hard disk access in the primary thread?
=> Could I solve the problem by creating my own Network-Thread which does handle everything related to QNetworkAccessManager?
=> Other suggestions?
Thanks in advance.
Bookmarks