Re: Slow gui response - need to see gtk queue

I dont think your problem has to do with the frequency at which you
update the GUI, typically when data arrives, you update your private
data representation of what should be displayed and then flag your UI as
"dirty" - whenever you happen to get a chance later on... you go and
actually update the GUI (i.e. no matter how many times you go and
call gdk_window_invalidate_region(), that region will only be "dirty"
once untill the server sends an expose event and your widget updates

  That's basically what I'm doing - but I set values for all my widgets once every 100 milliseconds, then I 
let the widget decide if it needs to be redrawn (In custom widgets, if the value doesn't change, then no 
redraw necessary - in gtk widgets, I'm assuming they redraw with the new value, even if the value didn't 
change). I'm glad you agree that the frequency doesn't change the problem, because my tests don't show any 
a.) Does your program or other programs on your desktop consume alot
of memory (is your program getting swapped out after time ?), does
it become responsive again after poking it ?

  It's not excessive amounts of memory, but I'm sure it gets swapped out (especially overnight) - and nothing 
that I do brings it back to the response like when first launched. Also, nothing else is running (besides 
b.) Is it possible that you are leaking event sources ?
(GSourceFuncs fed to g_idle_add/g_timeout_add that neglect to
return FALSE ever, or are accumulated over time without
properly bookkeeping the event source id and calling

  It's very possible.  I know one of my custom widgets is bad and I need to correct it (currently removed 
from this testing).  I do have a g_timeout_add that repeatedly calls the function to update the gui (this is 
the timing I played with for part a).  I don't return FALSE from this until I exit the gui (I want to 
continue to update the gui).  But this is the only timeout that I have, and I only call it once during gui 
construction.  This is why I wanted to see the gtk queue so I could figure out where my problem is.
  Thank you for your help Tristan,

Access over 1 million songs - Yahoo! Music Unlimited.

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