[Development] QT_XCB_NATIVE_PAINTING makes worse that without of it

Allan Sandfeld Jensen kde at carewolf.com
Fri Mar 22 17:06:32 CET 2019

On Freitag, 22. März 2019 12:46:59 CET Denis Shienkov wrote:
> Hi guys.
> I have iMX6 board with Qt 5.11.2 and Qt-widgets based application. I have
> compiled my Qt with an 'xcb_native_painting' option.
> I was hoping that this would speed up my UI and reduce the load on the CPU,
> but I was greatly mistaken:
> When the QT_XCB_NATIVE_PAINTING is not set, I got following top:
> * Xorg: 3.6 %
> * app: 12.8 %
> When the QT_XCB_NATIVE_PAINTING is *set*, I got following top:
> * Xorg: 23 %
> * app: 4.5 %
> What? QT_XCB_NATIVE_PAINTING makes it worse in 2x-times... WTF?
Sounds like XCB isn't as well optimized as Qt is ;)

Note though, that there are number of techniques to make the native painting 
faster, such as always using qpixmap so the images stays buffered on the 
server side. You might be able to massage your program to be faster with 
native painting, but the whole reason for switching to Qt side painting was 
that for the average application developer Qt side was faster.


More information about the Development mailing list