performance issue updating progressbars



Using gtk+-2.4.3, gentoo 1.4.x

        I have an application that uses progressbars as one way of communicating a
data value to a user.  It's a tuning application for an embedded automotive
ECU. (http://enterpriserp.com/~dandruczyk/ms/v0.3.5/runtime.png)
I've found that updating the progressbar via gtk_progress_dar_set_fraction() 
causes excessive CPU usage for my application.

Has anyone else experienced this?

As an example.  I get about 20 blocks of data from the ECU per second,  if I
update 20 progress bars at a max rate of 20 times per second the application is
completely unusable on a 366 mhz laptop,  on my dual athlon 1.2 ghz it eats up
to 40% of the CPU.   By modifying my code to only update if the value is
changed it drops the cpu usage significantly as long as most of the incoming
data isn't changing. The problem is that the progress bar updating functions
seem horribly inefficient. The problem I see is that the progress bar looks
just like a drawing area and all it should be doing is re-drawing  its
background, a rectangle and it's border (only if necessary), and it should NOT
be such a CPU pig when updating.  My other GTK+ app eXtace draws 40,000-60,000
gdk_lines/sec and only uses 5-15% of my cpu, and that includes running a 4096
point fft 35 times per second.





=====
Dave J. Andruczyk


        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 



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