Re: [gtk-list] Re: X and idles => incredible slowdowns



On Wed, May 03, 2000 at 05:51:05PM -0700, Timothy M. Shead wrote:
> As an additional suggestion:
> 
> Using a timeout function only works well if you can guarantee that your
> drawing time is less than the duration between timeout events.  If not, GTK+
> doesn't get a chance to handle events generated by the user (such as your
> checkbox).  I've had good success with setting a timeout event to twice the
> desired refresh frequency, and only refreshing the display every other
> timeout - this way, you guarantee a small amount of idle time for GTK+ to
> handle user interaction.

Do you have any useful tricks for figuring out how much time the
timeout event requires?  Mine's not going to be the same from
minute to minute.  I guess one can set a time stamp when it begins,
and another when it ends, and remove and add the timeout accordingly.
Is that what you would do?

Debby



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