Image rendering performance problem on iMac Retina 5K
I'm programming an application which can connect multiple cameras and display multiple "live" images simultaneously. I'm using the QGraphicsView and QGraphicsPixmapItem for rendering the camera images.
Everything works perfect until I run my application on iMac with Retina display (5K). I'm not able to display more than one live image because the application stops responding in fact. The GUI response is delayed >10 sec (depending on the number of opened live images). The cameras can provide about 60fps but the application was able to display max. 20fps in case the image was maximized and the app run in fullscreen mode. The image size coming from camera was 1280x800.
When I compile and run exactly the same application on Windows 10 (OS started using Mac's Bootcamp), everything was OK. The display resolution on Win was 3840x2160 and no problem with performance - I was able to open **about ten ** windows with live camera images a and the GUI response was acceptable (<= 0.5 sec). The rendering framerate of the live image was also significantly better (60 fps for single image, about 30fps for six live images).
Running the same application on MacBook with "normal" resolution (1440x900) works perfectly as well.
The only problem was on Retina display with high resolution on Mac Os X.
Please could anyone give me some hint how the resolve this problem?
Hardware: iMac 27" Retina 5K
I have some new observations. The problem is not with rendering itself. The paintEvent of the graphics view takes about 20ms which is similar value I took on Windows. It seems that the application does not process other GUI events. Here I have to say that the camera runs in separated thread, all images from camera are converted to RGB32 in separated thread as well so that the graphicsview does no explicit image format conversions.
And again: the problem appears on Mac with Retina 5K display only.