Slow Qt Widgets plotting over VNC on an ARM board (4–5 FPS)
-
Hi,
I have a Qt 6 Widgets application with real-time plots (Qwt). It runs on an ARM64 board and I view it over VNC (TigerVNC Xvnc, 1920×1080). The data arrives about 17 times per second, but the screen only updates 4–5 times per second.
What I found so far:
- Computation is not the problem: All of the calculation is in worker threads. The GUI thread only updates the plots.
- The VNC viewer slows painting down a lot: With the viewer disconnected, a full repaint takes ~60 ms. With the viewer connected, it takes ~250–300 ms, and most of that time is spent waiting for the X server, not painting.
- Window size matters: A smaller viewer window is faster, but I need to keep the window size free.
My questions:
- Is this the normal limit for this kind of CPU, or is there a way to make Qt wait less for the X server?
- Would Qt's own VNC platform plugin (-platform vnc) be faster than xcb + Xvnc?
- Any tips to reduce how much of the window is repainted each frame?
Thanks!
-
Hi,
Are you sure that it's not the network that is the bottleneck ? VNC is not exactly optimized for in terms of bandwidth. You might also want to check if you can tune the Xnvc server configuration to optimize for your use case.
-
I ran three different tests.
1 - On my own Windows computer, there were no issues.
2 - With fewer points—almost 1/5 fewer—I saw around 10–11 fps.
3 - With more points, I saw 4–5 fps.I don’t have any issues with data acquisition here; I’m getting similar speeds in all three tests.
As for the number of points, I’m not rendering all of them anyway—I’m rendering around 4,096 points. For that reason, I don’t think there’s a problem there.
It seems to me that I’m experiencing the usual spectrogram/waterfall issue again.
As for VNC, I’m not sure if the VNC screen refresh rate could be causing any issues. VNC is indeed a slower protocol compared to RDP, but I’m using VNC because I need a lower data transfer rate.
Actually, I’ve made a few changes to the VNC server settings, but unfortunately, I can’t set a fixed screen resolution, for example. Maybe setting the screen to 720p or so might help a bit, but then I might run into issues with the UI.
Does anyone have any suggestions?