Re: [gtk-list] Re: styles and writeable colormaps



>Basically the idea is to compress all the events in a "burst" into a
>single update operation, waiting for things to quiet down before you 
>actually do any updating.

i just wanted to underline Havoc's mention of this technique with a
personal anecdote. until a few weeks ago, i wasn't using this
technique when handling an external (non-mouse, non-keyboard) input
source that could generate up to about 1000 "events" per second. each
one of them potentially caused a flurry of GTK activity. in no time at
all, my connection to the X server would die. this wasn't just because
of the rate of things, but it did have something to do with it.

i switched to using the idle function/burst compression scheme, and
last week doubled the input data rate to 2000 events per minute:
everything runs just fine, and the screen updates at what appears to
be a perfectly normal fast-as-i-am-moving-the-input-device rate.

its a delight. i recommend it, even if your input device is just a
paltry mouse :)

--p



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