Handling big morphs

Bob Arning arning at charm.net
Sat Jul 7 21:29:40 UTC 2001


Hi Ross,

On Sat, 07 Jul 2001 13:22:23 -0700 Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
>>Why not send me the profile? I may be able to spot something.
>
>Thanks; that's very generous.  How do I send it?  

Just copy all the text and paste it into an email. Or save the contents of the Spy Results window to a file (use the menu on the scrollbar/more.../save contents to file...) and attach the file.

>I can display the profile 
>results, but see no obvious way to get them out of the system.  By the way, 
>screen capture wouldn't work because the results are more than one screen 
>(also I don't know how to do it).
>
>I'll send the results off list as they are a bit bulky and probably not of 
>general interest.
>
>I can describe a few things I've done for which your response might be of 
>interest.  Is there anything you can say about the following strategies' 
>effect on performance?  (or there general wisdom?)
>
>I built graphics out of morphs, rather than overriding the drawOn 
>method.  So I get grid lines by putting line morphs in my morph, and by 
>surrounding each cell with a bordered morph.  My guess is that is 
>inefficient compared to modifying  drawOn.  The TableMorph I got 
>(referenced on swiki page on GUI builders--can't remember who did it but AK 
>is on the change stamps) uses a drawOn strategy.  I'm not using it anymore 
>because I wanted different behavior.

One thing that could hurt here is that the grid lines have rather large extents (in one dimension). This might lead to rather large areas being invalidated and things being redrawn unnecessarily.

>There is a moderate amount of nesting.  For example, starting from an inner 
>cell I have
>UpdatingStringMorph < ActivityCellMorph < ActivityRow < ActivityTableMorph.
>
>The table is large enough that some of it is typically off-screen.  Is 
>there any special penalty there?

Normally not, but it is possible. If this is something you don't mind sharing, why not put it on BSS as a project including the change set with your code changes. It's a lot easier to make suggestions if you can actually see what you're talking about.

Cheers,
Bob





More information about the Squeak-dev mailing list