Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.12.6, 5.12.7
-
None
-
macOS 10.14 and 10.15, XCode 11.
Description
In our app (image viewer) we use QListView widget to display (long list of) thumbnails (and some metadata in text fields).
Starting from Qt 5.12.6 there is big slow down if connected display is in 10-bit (Deep Color) mode:
- in most cases, about 60-70% of CPU time is spent in macOS color conversion code, while overall application performance is acceptable.
- (even worse) there are several reports from our users (with 5K retina displays: iMac and even iMac Pro), that overall performance is not acceptable (about 5fps instead of 40-50 we usually see).
Profiler output is the same: most time is spent in CGColorTransformConvertUsingCMSConverter (and below, exact conversion is determined by display profile used, it is very probably that matrix display profiles results in acceptable results, while LUT profiles are not).
Qt 5.12.5 is not affected by the issue.
I was able to localize problem source: if I copy qtbase/src/plugins/cocoa/
{qcocoabackingstore,qiosurfacegraphicsbuffer}.
{mm,h} from 5.12.5 to 5.12.7 source tree (and rebuild), than the problem is gone.
I've also tried 5.12.5 files (listed above) + QNSWindowBackingStore::flush() from 5.12.7 also with success.
There are very small remaining differences in the 5.12.7 compared to 5.12.5, but I was unable to localize problem more, I know nothing about macOS/Quartz internals, so act blindly.
It would be great to restore 5.12.5 performance in this specific point.
Generally, it would be perfect to be able to set QApplication or QWidget color awareness by user: color management is great feature.... until it hurts performance.