FormCanvas>>transformBy:clippingTo:during:smoothing

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

FormCanvas>>transformBy:clippingTo:during:smoothing

Hal Eden
hi,

i've been puzzling over the slow performance of Transform*Morphs when  
their size becomes larger. (haven't found found much on the web  
beyond some vague references to slowness and some defunct threads on  
related subjects).

doing some profiling, i found that the issue is that if the  
transformation is more than just a translation, a new subcanvas is  
allocated, the area to be transformed is drawn to that subcanvas,  
then the result is warped to the original canvas.

all well and good--for small transformation areas, but it turns out  
that allocating the form often takes more time than is desirable if  
the form is much larger than 600x600 (x32bits). on my mac i found it  
taking 4-6 seconds. definitely enough to put a dent in smooth  
interaction.

i've been noodling around with a different approach, one which stores  
the transform in the GrafPort, so that when the actual drawing takes  
place, the transform is used.

my results are that for a 600x800 image form, the old way timeToRun  
is about 4700, with the experimental way, it is round 50.

i only played enough to get images working so far and can see that it  
would not be trivial to make it work for everything.

my question is, how would i go about pursuing this further in a way  
that might be useful "out there"--is anyone working on morphic  
maintenance?

or is the real culprit my VM's memory allocation?

thanks,

hal