PDA

View Full Version : Qt/CE Rendering Performance



jimfan
19th December 2007, 06:30
I am not sure if this is the right place for Qt/CE but please take a look at this problem.

Our target is a Davinci 300Mhz platform, LCD resolution is 800x480, we are trying to use the preview version of Qt/CE as our GUI toolkit. We've tried both 4.3.2 and 4.4 and both had the same performance issues.

The widget has four QPushButtons which are styled through a stylesheet like this:



PolyQPushButton
{
border: none;
background-image: url(Skins/default/softkey.png);
background-repeat: no-repeat;
background-position: bottom center;
min-width: 116px;
max-width: 116px;
min-height: 30px;
max-height: 30px;
color: white;
}
PolyQPushButton:pressed
{
background-image: url(Skins/default/softkey-pressed.png);
}
CSoftKeyWidget
{
background-image: url(Skins/default/softkeybk.png);
background-repeat: no-repeat;
min-width: 720px;
min-height: 50px;
}


The problem I am having is, whenever we update the labels of the QPushButton, it takes about 100-150ms to finish the rendering.. We are having problems with other widgets too on Qt/CE.

My question is, have any of you done performance evaluation on Qt/CE? Is there anyway that we could speed things up?

Thanks in advance for your help!
Jim

jacek
19th December 2007, 14:46
Is there anyway that we could speed things up?
How big are those images? You could use strace (or similar tool) to see how often Qt tries to read them.

jimfan
19th December 2007, 15:49
image size are specified in the stylesheet (112x30)

jacek
19th December 2007, 16:37
image size are specified in the stylesheet (112x30)
softkeybk.png seems to be bigger.

I would check when Qt reads those files from the disk. The delay might be caused by reading and decompression. You can place those files in resources to avoid reading overhead or use a smaller image.

jimfan
19th December 2007, 17:45
We have actually tried stylesheet with no background image for skbackground and softkeys, so it looks just like a regular push button. The speed is about the same. The modified stylesheet looks like this:

QPushButton
{
min-width: 116px;
max-width: 116px;
min-height: 30px;
max-height: 30px;
color: white;
}
PolyQPushButton:pressed
{
}
CSoftKeyWidget
{
min-width: 720px;
min-height: 50px;
}

jacek
19th December 2007, 19:31
Does this delay appear if you use style sheets? Have you tried a profiler to see where exactly this time is spent?

jimfan
20th December 2007, 07:58
looks like the printf() call for debug purposes slowed down the rendering process. We have multiple rendering descriptions (xml files) to send to the widgets, adding printf()s to the serial port seems to block these actions and causing unnecessary delays. After removing these calls it looks like it's a lot faster. Thanks for your help anyways.