Hi Michael,

On Tue, 2009-05-26 at 08:01 -0700, Michael Meeks wrote:
> Hi there,
> 
>       Please find attached an horrible hack that cuts a second off my mutter
> startup or so. It reduces the number of nbtk_stylable_get_style_id calls
> from 235k to 12k and the same for nbtk_stylable_get_style_class calls.
> 
>       For some obscure reason (and perhaps the real fix is here) - we call
> each of these methods around 20 times each, back to back ;-) so the
> cache helps rather a lot.
> 
>       This reduces the cost of 'get_style_id' and 'get_style_class' from 20%+
> to less than 1% of startup [ though there is a mismatch in those two
> numbers locally ;-] Be great to get some testing / input from someone
> who actually knows what is going on here ;-)
> 
>       It is of course possible that we see a lot more pain here because we
> don't turn off type-checking in gobject [ something sure to cause
> 'interesting' effects in the rest of the stack ;-], but hopefully it's a
> win whatever.

Thanks for the patch and reasoning.

After some discussion with Thomas Wood I did a cache -- much along the
lines what you did here for nbtk -- for libccss. My simplistic
sysprofing indicates the time nbtk spends in libccss is down by around
30%.

Best,
Rob Sta.

_______________________________________________
Moblin dev Mailing List
[email protected]

To manage or unsubscribe from this mailing list visit:
https://lists.moblin.org/mailman/listinfo/dev or your user account on 
http://moblin.org once logged in.

For more information on the Moblin Developer Mailing lists visit:
http://moblin.org/community/mailing-lists

Reply via email to