[BUG]Picking up morphs with the hand.

Andreas Raab andreas.raab at gmx.de
Thu Aug 7 22:47:00 UTC 2003


Hi Daniel,

> Any idea why the damage recorder isn't being used? that does some
> merging.

DamageRecorder could be used here but its strategy is somewhat questionable
for the particular case in question. DamageRecorder needs to assume that we
may have lots and lots of tiny rectangles coming along and will aggressively
merge stuff even at the expense of larger overall areas to redraw. That's a
reasonable strategy for arbitrary morphs but in the case of the hand we know
that the hand is going to redraw pretty much everything, e.g., a few large
instead of lots of small areas. If, for any reason, we have computed a
relatively large list of damage for the world, we may forceToScreen even
larger portions when you try to merge the hand damage. For this situation,
the code I posted is more adequate as it will not introduce larger areas and
be accurate (at the assumption that hands generate few damage areas which is
generally true).

> gives me back 20%, on 
> 
> TimeProfileBrowser onBlock: [5 timesRepeat: [ActiveHand grabMorph: s .
> World doOneCycle. ActiveHand dropMorphs. World doOneCycle.]] 
> 
> 20% isn't much, though. 

20% is quite a bit more than I would have expected ;-) See my other post.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list