Re: CPU consumption with GtkThread
Jacques Garrigue <[email protected]> Wed, 15 Dec 2010 16:24:17 +0900
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Dec 15, 2010 at 3:43 PM, Maxence Guesdon <[email protected]> wrote: > On Tue, 14 Dec 2010 12:18:00 +0100 > Adrien <[email protected]> wrote: > >> Hi, >> >> I actually made it adaptive later on[1]. The drawback was that >> animations could take more time to update. The adaptative version >> worked quite well but reducing the delay wasn't instantaneous. It was >> pretty dumb and experimental, I could probably put more thought in it >> if needed. >> One of my test was using the acid3 test[2]. Basically, each step of >> the animation required one iteration of the loop. So depending on your >> uses it might or might not be a good idea. > > Maybe the GtkThread module could allow setting some kind of callback so > that the application could change this delay when needed ? I was not aware of this GtkThread problem, but I'm certainly not opposed to making the delay tweakable by the application. One difficulty is that I suppose this depends quite a lot on the OS scheduler, and in particular on its granularity, so that the application may not know enough to set this value properly, but at least it is better than nothing. Jacques