2009/12/28 Igor Stasenko <
[hidden email]>:
> 2009/12/27 Nicolas Cellier <
[hidden email]>:
>> 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.
>
Yes exactly that's the problem and that's why I ask.
I used it in a very controlled fashion over-protecting with a probably
unecessary copy in the preamble.
But you never know how the message will be used once you release it...
Anyway, some benchmark would be necessary before touching these bits...
Nicolas
>> cheers
>>
>> Nicolas
>>
>>
>
>
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>