[squeak-dev] Re: WorldState deferredUIMessages queue
Andreas Raab
andreas.raab at gmx.de
Fri Mar 27 02:01:27 UTC 2009
Chris Muller wrote:
> I'm curious, though, like sig what the premise of the 3.9 timing "for
> UI responsiveness" was about. I didn't include it in my my fix for
> now, I'm curious what the exact effect is.. Based on my observation,
> to allow input events continue to be accepted always at a reasonable
> rate (200 ms) gave the appearance of "background" redraws, because
> the MouseOver events were definitely firing while it was drawing.. An
> interesting consideration, I'm not sure yet whether to prefer that or
> the slight delay but with better overall Morph-drawing throughput,
> which is what I get with the 3.8 approach.
I suspect that the background of the change is some fairly application
specific situation. I could imagine that if someone fired tons and tons
and tons of deferred UI messages from a background thread this could
conceivably lead to a UI lockup since the UI does nothing but process
these messages. But I can't really see this happening since there are
few users of deferred UI messages.
In any case, we can have our cake and eat it, too by doing something
along the lines of:
startTime := Time millisecondClockValue.
[(msg := queue nextOrNil) == nil] whileFalse:[
msg value.
(Time millisecondsSince: startTime) > threshold ifTrue:[^self].
]
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|