WinterbellProfile

From Gnash Project Wiki

Jump to: navigation, search

Movie: http://www.ferryhalim.com/orisinal/g3/bells.htm

The game can't keep up with FPS, resulting in stuttering playback in "catch-up-time" mode (the default at time of writing - 0.8.8).

There are two performance problems. One is with rendering, the other with Actionscript.

Rendering bottleneck

Renderer is the bottleneck by the start of the game. At this time invalidated ranges cover the whole stage so it takes a full re-render for each frame. Just starting the game with no sound handler and doing no other action (no mouse movements) gives the following time figures:

time calls function
43.55% 1221019 BitmapStyle::generate_span(agg::rgba8*, int, int, unsigned int)
9.33% 3173316 agg::renderer_base::blend_color_hspan
2.79% 3065 Renderer_agg::begin_display()
2.67% 19798652 PropertyList::getProperty

Full signature for the bottleneck function, if you can read it, follows:

gnash::(anonymous namespace)::BitmapStyle<
 agg::pixfmt_alpha_blend_rgb<
   agg::blender_rgb_pre<
     agg::rgba8, agg::order_rgb
   >,
   agg::row_accessor<unsigned char>
 >,
 agg::span_allocator<
   agg::pixfmt_alpha_blend_rgb<
     agg::blender_rgb_pre<agg::rgba8, agg::order_rgb>,
     agg::row_accessor<unsigned char>
   >
 >,
 agg::image_accessor_clone<
   agg::pixfmt_alpha_blend_rgb<
     agg::blender_rgb_pre<agg::rgba8, agg::order_rgb>,
     agg::row_accessor<unsigned char>
   >
 >,
 agg::span_interpolator_linear<agg::trans_affine, 8u>,
 agg::span_image_filter_rgb_nn<
   agg::image_accessor_clone<
     agg::pixfmt_alpha_blend_rgb<
       agg::blender_rgb_pre<agg::rgba8, agg::order_rgb>,
       agg::row_accessor<unsigned char>
     >
   >,
   agg::span_interpolator_linear<agg::trans_affine, 8u>
 >
>::generate_span(agg::rgba8*, int, int, unsigned int)

ActionScript bottleneck

The ActionScript bottleneck happens when playing for some times. Most of the time is spent in getProperty and string_table::noCase. Work in the 'objecturi' branch is focused on improving ::noCase.