Issue 3562 in pharo: Deferred UI messages executed slowly

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3562 in pharo: Deferred UI messages executed slowly

pharo
Status: New
Owner: ----

New issue 3562 by [hidden email]: Deferred UI messages executed  
slowly
http://code.google.com/p/pharo/issues/detail?id=3562

Pharo1.2rc1
Latest update: #12313

Processing deferred ui messages seems to be really slow. You can test it by  
executing this:

| rnd |
rnd := Random new.
100 timesRepeat: [
        WorldState addDeferredUIMessage: [
                Morph new openInWorld; center: rnd next @ rnd next * Display extent.
                ]
        ].

You'll notice it takes a couple of seconds to finish opening all the  
morphs, but if you remove the #addDeferredUIMessage: send, it is  
instantaneous. In Squeak and Etoys both versions are equally fast.

I think the bug is in WorldState>>#runStepsMethodsIn:. It seems it only  
executes one deferred ui message per step. With the implementation below  
the problem is fixed.

WorldState>>#runStepMethodsIn: aWorld
        "Perform periodic activity inbetween event cycles"
        | queue nextInQueue|

        "If available dispatch some deferred UI Message"
        queue := self class deferredUIMessages.
        [(nextInQueue := queue nextOrNil) isNil]
                whileFalse: [ nextInQueue value].

        self runLocalStepMethodsIn: aWorld.



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3562 in pharo: Deferred UI messages executed slowly

pharo
Updates:
        Status: Fixed
        Labels: Milestone-1.3

Comment #1 on issue 3562 by marianopeck: Deferred UI messages executed  
slowly
http://code.google.com/p/pharo/issues/detail?id=3562

thanks richo :)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3562 in pharo: Deferred UI messages executed slowly

pharo
Updates:
        Status: FixProposed

Comment #2 on issue 3562 by [hidden email]: Deferred UI messages  
executed slowly
http://code.google.com/p/pharo/issues/detail?id=3562

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3562 in pharo: Deferred UI messages executed slowly

pharo
Updates:
        Status: Closed

Comment #3 on issue 3562 by [hidden email]: Deferred UI messages  
executed slowly
http://code.google.com/p/pharo/issues/detail?id=3562

in 13033