gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] FPS sync


From: Wei Cao
Subject: Re: [Gnash-dev] FPS sync
Date: Thu, 28 May 2009 02:12:50 +0800



2009/5/27 strk <address@hidden>
On Wed, May 27, 2009 at 11:39:26PM +0800, Wei Cao wrote:
> hi, all, I tested u2_has.swf on my windows laptop, hope it's not so late . I
> just tried the first 400 frames with the command
>
>     ./sdl-gnash.exe --max-advances 400 u2_has.swf
>
> The gnash-0.8.5 with the patch last time I sent uses 61.770s CPU time,
> 51.006s is consumed in draw_shape_character , there are total 84384  calls
> to AGG.
>
> The optimized version uses 44.744s CPU time, 36.268s in
> draw_shape_character, there are only 32123 calls to AGG now, which means,
> 5/8 calls to AGG and 25% CPU time is saved by cache.

Visible effects on FPS (max/min/avg) ?
 
yeah,  this is comparision of five to ten seconds
 
 gnash 0.8.5
Effective frame rate: 3.94 fps (min 3.94, avg 4.25, max 4.89, 20 frames in 4.7 secs total)
Effective frame rate: 4.06 fps (min 3.94, avg 4.21, max 4.89, 25 frames in 5.9 secs total)
Effective frame rate: 3.91 fps (min 3.91, avg 4.17, max 4.89, 29 frames in 7.0 secs total)
Effective frame rate: 3.97 fps (min 3.91, avg 4.14, max 4.89, 33 frames in 8.0 secs total)
Effective frame rate: 4.00 fps (min 3.91, avg 4.13, max 4.89, 37 frames in 9.0 secs total)
Effective frame rate: 4.03 fps (min 3.91, avg 4.12, max 4.89, 42 frames in 10.2 secs total)

cache version
Effective frame rate: 5.98 fps (min 5.65, avg 5.81, max 5.98, 30 frames in 5.2 secs total)
Effective frame rate: 5.48 fps (min 5.48, avg 5.75, max 5.98, 36 frames in 6.3 secs total)
Effective frame rate: 5.73 fps (min 5.48, avg 5.75, max 5.98, 42 frames in 7.3 secs total)
Effective frame rate: 5.78 fps (min 5.48, avg 5.75, max 5.98, 48 frames in 8.3 secs total)
Effective frame rate: 5.75 fps (min 5.48, avg 5.75, max 5.98, 54 frames in 9.4 secs total)
Effective frame rate: 5.76 fps (min 5.48, avg 5.75, max 5.98, 60 frames in 10.4 secs total)
 


> One question, I found there are three lt-sdl-gnash processes executing at
> the same time when I play a single flash file on a  arm like system, one
> takes about 70% CPU and 25% the second, and 2% the third, when I kill one of
> the three processes, the other quit too.  I use dynamic linking.
>
> The question is, why there are three processes when I execut the libtool
> generated script sdl-gnash only once, where and when they are forked in the
> code?

It could be your process table lister considers each thread as a
separate process. One thread is the SDL sound consumer, one is the parser
and one is the main one. The parser is likely the 2% one, the sound the 25%
and the rest is main (VM + renderer).
 
 
thx, I will shutdown sound thread and have a try tomorrow.
 


NOTE: current trunk fails building statically, I hope it's going to
     be fixed soon for more detailed profiling.

PS: Any progress about cleanup/port to trunk ? Need help ?
 
 
Hm.. Recently I wrote a alpha blending function to blend cached RGBA bitmap to agg's screen use SIMD instructions. The cache code is stable now I think, memory is freeed when character::destroy is called, every thing is OK except after running a long time (  loop for hundreds of times ), then process's memory footprint will begin to expand from a reasonable value, e.g. 20M, to hundreds of megabytes all of a sudden, I havn't found the reason.
 


--strk;

 Free GIS & Flash consultant/developer      ()  ASCII Ribbon Campaign
 http://foo.keybit.net/~strk/services.html  /\  Keep it simple!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]