Qt painting is SLOW on N810

With all the recent interest in Nokia's N810 device among KDE and Qt developers I think it is important to note that Qt/X11 painting performance is badly broken when running under Hildon. I've been porting a QtWebKit based browser to the N810 for awhile now and have noticed a steep drop in performance when compared to the same browser running under Qtopia Phone Edition on the very same device.

Specifically, Xrender performance on the N810 (at least the codepaths that Qt uses) is incredibly slow. What's more, using CPU based raster image is also very slow because of the overhead of blitting the QImage to the screen under X11. Inspired by Zack's recent post I thought it would be a good idea to quantify just how bad the problem is. With a little modification to disable the GL option, I ran Zack's qgears2 program on the N810.

Here are the results in FPS:

Xrender: 1.411 FPS
Raster: 2.750 FPS

Xrender: 3.028 FPS
Raster: 5.004 FPS

Xrender: 6.016 FPS
Raster: 4.629 FPS

Xrender: 3.545 FPS
Raster: 4.060 FPS

Just horrible numbers. However, this doesn't tell the whole story. The raster based method incurs more overhead than the Xrender path by design. For the raster based method all paint operations operate on a QImage and then are blitted at the end to the widget's backingstore. This blit takes anywhere from 20-40% of the time depending upon the test.

These numbers taken together do not bode well for the idea of getting any kind of performance out of graphics intensive Qt programs on the N810. At least until Xrender is fixed.


..have noticed a steep drop in performance when compared to the same browser running under Qtopia Phone Edition on the very same device.

That's interesting - is it easy to get Qtopia running on the n810 - are there any HOWTOs about getting it working? I've been wondering why the n810 runs X11, when it is supposed to be an 'embedded device'. I can't really imagine a typical customer needing to access it via an X11 server on their laptop or whatever.

By Richard Dale at Fri, 08/22/2008 - 20:48

It is one of the available targets. Is not hard to get it running at all.

By Adam Treat at Fri, 08/22/2008 - 21:10

By supporting X11, you in theory get access to a ton of applications that already run on that platform. It makes it all a bit less "exotic". I don't know if I particularly agree with that strategy, but that was probably the thinking...... their original choice of toolkits and applications probably had a lot to do with these choices, I'd imagine.

By Aaron J. Seigo at Fri, 08/22/2008 - 21:24

a better solution will be to get Qt rendering using OpenGL ES and use the PowerVG MBX GPU on the device instead of the dummy framebuffer; at that point we'd likely see sick framerates.

this would take two things happening: an MBX driver for Linux appearing on the scene and a proper GL QPaintDevice backend.

i don't think we'll see this magical pairing occur on the n810, but i'd be surprised if it didn't All Come Together(tm) on forthcoming Nokia N Series devices.

p.s. i have no inside knowledge relating to any of the above, this is just my own analysis.

By Aaron J. Seigo at Fri, 08/22/2008 - 21:22

But I don't think there is any reason for such abysmal frame rates on such a device. It just shouldn't be that slow. And it'll be a pity if they can't fix this without waiting for new hardware.

By Adam Treat at Fri, 08/22/2008 - 21:35

This is hopefully still fixable. See also what I wrote

By ariya at Sat, 08/23/2008 - 06:30

X11 was developed in the 80s, there's nothing intrinsically about it that would make it unsuitable for embedded.

By eean at Sat, 08/23/2008 - 02:27