Re: toward a more efficient event loop
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
If there is a better strategy in Cuis, we should adopt it if possible. There is a lot of good design thinking in Cuis. Do you have a pointer (class/method) to where this is implemented in the Cuis image? Thanks, Dave On 2026-08-22 19:18, Nicolas Cellier wrote: > Hi all, > if you compare Cuis morphic feel to Squeak morphic feel, the former > looks snappy, the latter sluggish. > Especially if your trackpad generates a bunch of MouseWheelEvent > (MouseScrollEvent in Cuis) whenever you're willing to scroll. > Why is that? > > Squeak World goes through an interCyclePause: at every mouse event. > Indeed, when the hand processEvents it stops at first mouse event > encountered. > > Hence, unless you are ready to sacrifice some battery life with a > Preferences higherPerformance, > the event buffer might take several seconds to drain with such > strategy, especially on mac. > It makes the user experience somehow catastrophic. > > Cuis has a different strategy: > - processEvents drains the event buffer. > however, it only processes one mouse move event per cycle, and drops > the other ones. > - the world cycle doesn't pause if (lastCycleHadAnyEvent or: [ > deferredUIMessages isEmpty not ]) > - it also does not pause further than the next morphic step or alarm > - the pause grows gradually from 20 to 200ms whenever there is no > activity > but at least %)ms in server mode > > Maybe it's time to revise our strategy too ! > > Nicolas > Squeak-dev mailing list -- [email protected] > To unsubscribe send an email to > [email protected] Squeak-dev mailing list -- [email protected] To unsubscribe send an email to [email protected]