[Qt-jambi-interest] QPixmap erratic performance

Gunnar Sletta gunnar at trolltech.com
Mon Nov 17 11:33:29 CET 2008


Bart van Deenen wrote:

> I've narrowed down my source code to something simple. Unfortunately, 
> now the erraticness is gone! It seems to have to do with the number or 
> size of QPixmaps I'm using to draw my main QPixmap :-(
> 
> Here's my non-erratic code. The only difference with my problem code is 
> that the 'render' function here consists of one QPixmap being drawn into 
> my root object, and that with the trouble code there's a lot of QPixmaps 
> rendering into each other, and finally being combined into the root 
> QPixmap. The problem is not the overal time it takes to do the 
> rendering; with a simplified tree of objects that is consistently below 
> 5 ms. I don't understand where the problem is starting to occur :-(. 
> Next I'll add some more of my 'sprite_object's to see if it's the number 
> or size of them that matters.

Because of the dynamic nature of Java, with 7 or so active threads 
running at the same time, even in a "single-threaded" app, I would 
recommend that you time at at least 100k operations before you make any 
kinds of assumtions ;)

-
Gunnar




More information about the Qt-jambi-interest mailing list