Rendering performance problems on iMac with Retina 5K
-
Update: @mrjj did not tell me anything regarding the difference between Qt QML and Qt Widgets.
Thanks to some answers from experts on Zhihu. Now the reason of the performance issue has been found out: Qt Widgets is a deprecated approach which never consults GPU for UI graphic manipulation.
The solution is simple: Use Qt Quick + QML instead.
-
@ShikiSuen
Super.
QML is not intended for heavy calculations so for that kind of program you will need
Qt Quick + QML instead + C++ backend. -
Hi PetrM.
Please update the link to your "working example" - it reports "File Not Found" now.
I'd like to reproduce your results on my MacBook. -
@DmitryGrig
The link above is working now. Or just click here. -
@ShikiSuen said in Rendering performance problems on iMac with Retina 5K:
Update: @mrjj did not tell me anything regarding the difference between Qt QML and Qt Widgets.
Thanks to some answers from experts on Zhihu. Now the reason of the performance issue has been found out: Qt Widgets is a deprecated approach which never consults GPU for UI graphic manipulation.
The solution is simple: Use Qt Quick + QML instead.
You can't be serious. That's equivalent to tearing down your house and rebuilding it from the foundation. That's not a "simple" solution.
I too have experienced QWidgets - in my case with QLabel poor rendering performance, and strangely enough, Hackintosh in Virtual box runs faster than better specced native hardware.
-
@mrjj @ShikiSuen there is a real performance problem not with QWidgets, but with QWidgets's macOS implementation. I'm dual booting macOS/Linux on a retina macbook, and all the QWidgets applications I use, QtCreator, Clementine, Wireshark, (and the ones I develop) are much more fluid and smooth under Linux than MacOS even though it's the same hardware and screen resolution.
-
@jcelerier
What resolution was it ? -
If anyone's interested I did a pass through Xcode's performance tools and put the trace here :
as you can see, roughly 25% of the time is spent in CGContextDrawImage. This was with QtCreator, but I have similar findings when benchmarking my app.
-
Super.
Hopefully a fix comes out of it if possible. -
I experience intolerably poor graphics performance on Macs with QtWidgets in the following constellation:
- Qt 5, any version - Qt 4 on the same hardware is fine.
- macOS 10.10 and up - 10.9 or older on the same hardware is fine.
- not limited to retina displays, though obviously worse on them.
This is becoming a major PITA as it means my cross-platform app remains stuck at Qt 4.8.6 / Quick 1.1 on macOS, vs. Qt 5.6 / Quick 2.3 everywhere else.
-
To be precise, by Qt5 widgets being "fine" on macOS 10.9 or older I mean that the lag is "only" ~50ms, not seconds. I suspect (though can't test right now) that adding a GL widget (cf QTBUG-61384) might get me in the same 50ms ballpark on newer versions of macOS, but that's still too much for my software (a strobe tuner, which needs fast rendering).
@jcelerier Right on, the last Qt version with decent QWidgets rendering performance on macOS was 4.8 with the raster engine. Qt5 widgets have been unusable for real-time graphics on Macs from the start, and it hasn't gotten any better. @ShikiSuen Steinberg has my full sympathies, I know how it feels like.
-