[squeak-dev] [Ann] Cuis 3.1 is available

Juan Vuletich juan at jvuletich.org
Sat Mar 5 14:56:17 UTC 2011


Herbert König wrote:
> Hi Juan,
>
> JV> But please, do download the system, play with it, and experiment with
> JV> this (and anything else) inside the system. I want more users, even if
> JV> occasional. And please do comment on your experience.
>
> for some reason I benchmarked creating, hiding, showing and deleting
> 10.000 EllipseMorphs over several Images and VM's. Cuis performed best
> especially in using least CPU with many Morphs on screen.
>
> Details at the bottom of:
> http://openinworld.com/2011/03/morphic-performance-testing/morphicperftest01-2/#comment-2
>
> I liked Cuis a lot! My way of developing heavily depends on Projects
> which I didn't find.
>
>
> Cheers,
>
> Herbert
>
>   

That code is good for benchmarking, but not for a real app. These minor 
tweaks allow opening a lot (really a lot) of morphs under one second:

rand := Random new.
creating := [
    m := EllipseMorph  new.
    ellipses add: m.
    m color: Color random.
    m position: ActiveWorld extent * ((rand next)@(rand next)) ].
deleting := [ World removeAllMorphsIn: ellipses].
hiding := [ ellipses do: [ :item | item hide ]].
showing := [ ellipses do: [ :item | item show ]].

#( 1 10  100 200 300 400 500 600 700 800 900 1000 2000
 3000 4000 5000 6000 7000 8000 9000 10000  30000 100000)
do: [ :amount |
ellipses := OrderedCollection new.
    createTime := [ amount timesRepeat: creating .
    World addAllMorphs: ellipses.
] timeToRun.
    hideTime := [ hiding value ] timeToRun.
    showTime := [ showing value ] timeToRun.
    deleteTime := [ deleting value ] timeToRun.
    Transcript show: 'amount=', amount asString,
                     '   createTime=',  createTime asString,
                     '  hideTime=', hideTime asString,
                     '  showTime=', showTime asString,
                     '   deleteTime=', deleteTime asString;  cr]

Cheers,
Juan Vuletich



More information about the Squeak-dev mailing list