[squeak-dev] Rectangle swallow:

Igor Stasenko siguctua at gmail.com
Mon Dec 28 02:22:57 UTC 2009


2009/12/27 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> I put an experimental SLICE in the inbox: let a Rectangle merge in
> place (I called this swallow:)
> This has two advantages:
> - avoid repeated Object creation when we just want the gross result
> - avoid closures writing to outer temps
>
> IMHO, generalizing this kind of policy could have a measurable impact
> on GUI speed.
> However, this is against current policy to never change a Point nor
> rectangle in place, so I let gurus judge if worth or not.
>

Oh , you mean, that this method modifying the state of existing
Rectangle instance,
instead of producing new one?
It is certaintly more optimal, especially in Morphic world. But it
should be used with care,
since sometimes you don't know, how many other morphs refer to same
rectangle instance or
where it came from.

> cheers
>
> Nicolas
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list