[Q] slow animated dashed lines/connectors

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Sat Apr 19 12:10:33 UTC 2003


Am Samstag, 19.04.03 um 12:02 Uhr schrieb Martin Drautzburg:

> When you create a animated dashed line or connector e.g.
>         {10 . 5 . Color red . 0 . 3}
> and then clone it via the halo to apx 20 instances the UI becomes
> really sluggish. I believe Squeak redraws each line on each step,
> which is of course a lot of work.

1) render one of the 20 instances to a form and then just blt this form 
20 times
1a) cache the rendered form for all steps of the animation and reuse
2) use longer dashes, which reduces their number
3) render the outline using OpenGL, with textures for the dashes. 
Animate the texture matrix in each step.
4) use 8 bit paletted screen mode and animate the palette (fastest)
5) use a faster computer

> OTOH it changes only a few pixels on the screen so I thought maybe
> someone has an idea how one could speed this up.

OTTH do not see a use for 20 flashing polygon outlines on my screen. 
Which is why I wouln't bother optimizing this. OTFH, if you really want 
to, start with a tally to see what takes so much time.

-- Bert



More information about the Squeak-dev mailing list