Re: gtk_label_set_text severe performance issue



Hello,

I had the same problem, only I had to update 2048 sets of numbers at around 30 times/second. It took over 5 seconds to do one update and I ended up going back to the primitives for drawing characters from gdk. This issue has been brought up by a lot of people actually, it seems that it is a problem with the time it takes for pango to render a block of text. The only thing I can suggest is to only update the text number if it has actually changed.....Pango font rendering is extremely slow and a CPU hog for displaying real time data. Other than that, maybe join the pango team and help to get this changed? Someone else might be able to shed more light on this subject than me.

Jimmy

On Nov 9, 2004, at 3:39 PM, Dave Andruczyk wrote:

I have an application that updates a bunch of GTK_LABEL's used for status information. (about 15 labels at a max refresh of about 30 times per second)

When updating only about 5 of the 15 labels at 30 times/sec CPU usage stays at a steady 35% (Athlon 1.2Ghz) updating all at 3o times/sec nearly maxes the CPU out. Commenting out the gtk_label_set_text() calls keeps cpu usage at 0%.
What gives?

The labels are being updated with a 3 to 5 charactor number (like 125.5), so
it's not like I'm rerendering a large block of text...

This is with GTK+-2.4.9 on gentoo linux.  (I've seen this problem since
GTK+-2.0)




=====
Dave J. Andruczyk


                
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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