Re: Performance notes on background flickering

On Mon, 2004-05-03 at 23:58, Havoc Pennington wrote:
> On Mon, 2004-05-03 at 15:06, Soeren Sandmann Pedersen wrote:
> >     meta_draw_op_draw_with_env					24.28%
> >         draw_op_as_pixbuf()					11.72%
> >             meta_gradient_spec_render 				 8.62%
> >                 meta_gradient_create_multi_vertical		 7.21%
> > 	    scale_and_alpha_pixbuf				 2.68%
> Are the percentages including the children, or in the function itself?

They include the children. The indents show caller/callee status, so
meta_gradient_spec_render() is called by draw_op_as_pixbuf(), and is
responsible for most of the time spent anywhere inside

> It looks like a big pain here is generating the gradients, Bluecurve
> overlays several gradients IIRC. What does the profile look like with a
> trivial minimalist theme with only X drawing calls (lines, etc.)

The fastest metacity theme I have installed is AgingGorilla. With that
theme the profile looks like this:

> > A different approach is to "compile" the tree into pixmaps. I think it
> > is possible for most themes to be compiled into a small number
> > of pixmaps and make the frame paint be just blitting those to the
> > screen. I think this would essentially make metacity disappear from the
> > profile, but it is a relatively big and non-trivial project.
> But e.g. the Bluecurve titlebar is not a tiling of pixmaps, it's going
> to be a different titlebar pixmap for every window size - which could
> use a ton of memory.

But it is a tiling of pix*bufs* (with alpha), so you are right that it
probably can't be compiled into pixmaps, but it can be compiled into a
fairly small number of overlaying pixbufs. Also the gradients are
generally vertical which means they don't have to be regenerated for
each different width, only for different heights, and there are only a
few of those.


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