[Goodies-dev] use of gtk progress bar in panel plugins

Yves-Alexis Perez corsac at corsac.net
Mon Nov 5 13:14:11 CET 2007


Some time ago, I noticed that battery plugin had a uncommon cpu usage (for
it's role) and using powertop I noticed that it caused a lot of cpu wakeups.

I spend some time investigating the problem, and it comes out that (at least)
one responsible is gtk_progress_bar_set_fraction(). Commenting out the call in
the battery plugin makes it a lot more cpu-friendly (and battery friendly
too).

The thing is, quite a few plugins use progress bar to display information, and
I don't think it's a really good idea. Progress bar are meant to display
transitional informations, not permanent ones. And the way gtk implements it
make them quite cpu intensive (it may depend on the gtk engines, though).

I guess there should be a way to display information otherwise, but can't find
a good idea right now.

What do you think?

Cheers,
-- 
Yves-Alexis Perez



More information about the Goodies-dev mailing list