-------- Message original -------- Sujet: Re: Slowness question Date : Thu, 5 Jun 2014 07:02:44 +0200 De : Clément Bera <bera.clement@gmail.com> Répondre à : Any question about pharo is welcome <pharo-users@lists.pharo.org> Pour : Any question about pharo is welcome <pharo-users@lists.pharo.org> Groupes de discussion: gmane.comp.lang.smalltalk.pharo.user Références : <lmo29u$qu0$1@ger.gmane.org> Igor do you have a clue ? (I'm not sure Igor is on pharo-users) Clement 2014-06-04 23:15 GMT+02:00 Hilaire Fernandes <hilaire.fernandes@gmail.com <mailto:hilaire.fernandes@gmail.com>>: Hi, Programmed sketch in DrGeo can be animated, for example like the script bellow. The "canvas do:" message forks the block so user is not blocked. At #udpate message the items and views (morph) are recomputed and refreshed . Before porting DrGeo to Athens, the animation was pretty fast, now it is very slow. Any idea from where it could come from? Thanks ---8<------ |canvas s stats points| points :=Array new: 12. stats := Array new: 12 withAll: 0. canvas := DrGeoCanvas new. 2 to: 12 do: [:i | points at: i put: (canvas point: i@0.1). (points at: i) square; color: Color blue. s := canvas segment: i@0 to: (points at: i). s color: Color red]. canvas do: [ 1 to: 10000 do: [:i| s := 6 atRandom + 6 atRandom. stats at: s put: ((stats at: s)+1). (points at: s) name: (stats at: s) asString; moveTo: s @ ((stats at: s) / 100). canvas update]. ---8<------ -- Dr. Geo http://drgeo.eu
participants (1)
-
Hilaire Fernandes