(severe) performance issues



 Has anyone else noticed excessive cpu usage when updating certain
GTK+ (2.10.x) widgets?

I have a piece of software that updates a set of text fields
(GtkLabel's) and uses progress bars to indicate a quantity
graphically, and am finding excessively high amounts of CPU usage
when these calls are made.  Commenting out calls to
"gtk_label_set_text" and "gtk_progress_bar_set_fraction"  brings
cpu usage back to near zero levels..  I have profiled my code
extensively using gprof/memprof and the problem is not inside of my
own code fro mwhat the profiler tells me.

I would NOT expect updating approx 10 labels perhaps 5-10 times per
second (ie. when data chages) on a 1.8Ghz machine be so cpu hungry.
 I have code in place ALREADY to prevent unnecessary updates. 
Without that bit of code, cpu usage will easily max the machine
even at lower update rates.

I can only suspect that it's an internal GTK+ or pango issue, as my
own custom widgets (custom automotive gauges, i.e.
http://megatunix.sourceforge.net/cluster.gif) are far more
graphically intensive and I can have multiple instances (about 4-6
updating at any one time for this informal test) of them updating
at 30x per second and only have a minimal cpu load of about 15%

Does the label or progress bar code use
gtk_widget_invalidate_region? (I found that to have a major cpu
penalty when developing my custom widgets so I stopped using it in
my design.)



-- David J. Andruczyk


 
____________________________________________________________________________________
Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097



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