What does the profiler say? Alain On Thu, Jun 5, 2014 at 1:15 AM, Hilaire Fernandes < hilaire.fernandes@gmail.com> wrote:
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