[Kde-games-devel] Low framerate in Kdiamond

Stefan Majewsky majewsky at gmx.net
Tue May 20 22:46:18 CEST 2008


At first, thanks to Ian for helping this. I'll be providing data for you to 
analyze. ^^

Am Dienstag 20 Mai 2008 03:26:02 schrieb Ian Wadham:
> Have you tested that possibility using "export QT_FLUSH_PAINT=1"?  Hope
> it still works for you.  It has recently stopped working for me.  It should
> highlight areas that are being repainted.

That does not work for me, but there is a KWin plugin that shows repaint 
areas. I see that the whole view is repainted every second, and repaints are 
limited to the changed areas pretty well. I'm going to investigate whether 
increasing the distance between diamond pixmaps helps.

> Also are timings any better if you make a move near the top of the screen,
> thus minimising the overall area that is affected by the move?

The idea with the number of moving diamonds is good. Again some data, this 
time for a 100x100 board: (analysis comes after this)

kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
16  of  258  starts at  1638  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
125  of  258  starts at  5049  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
221  of  258  starts at  7782  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
239  of  258  starts at  8533  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
243  of  258  starts at  8759  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
247  of  258  starts at  8956  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
248  of  258  starts at  9044  msecs with a scheduled total of  10320  msecs
kdiamond(7829) MoveAnimator::setFrame: Calculating  3364  animations in frame  
[...]

Of course, the amount of moving diamonds decreases as the lower pieces slowly 
fall into place. The animation becomes much smoother then. In this example, 
we see only two frames in the first six seconds of a ten seconds animation. 
The most interesting part is that the time until the first frame is shown is 
not the biggest one. The time between first and second frame is much bigger 
(3,5 seconds against 1,5 seconds). Now that is strange!

For the remove animation, the third and seventh frame are shown. That means 
that the time between animation start and first frame nearly stays the same, 
while the time between first and second frame noticeably increases.

> P.S. KGoldrunner switched to KGameCanvas back then (about 2 years ago)
> and has been using it ever since, with no problems.  QGV has improved its
> performance in the meantime, but I am still not convinced it can handle
> fast animation consistently and reliably.

I was hoping that I can stick with QGV for a while...

Good night
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080520/ad308ade/attachment.pgp 


More information about the kde-games-devel mailing list