<br><div class="gmail_quote">On Fri, Feb 11, 2011 at 3:29 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:&gt;</div><div class="gmail_quote">(snip)</div><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">you can do something like:<br>
  World blahblah...<br>
no?<br>
I am sure, if you look deeply there is a way to iterate over all submorphs tree.<br></blockquote><div> </div><div>I think you mean</div><div><br></div><div>World&gt;&gt;#allMorphsDo:</div><div><br></div><div>and in my experience it is *much* faster than iterating over all objects.</div>

<div><br></div><div>Cheers</div><div>Richo</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
And don&#39;t say that it will be slower than iterating over all objects<br>
in object memory.<br>
<br>
But even if you do, then why not iterating over morphs , so you don&#39;t<br>
have to use #isMorph<br>
<br>
Morph allSubInstancesDo: ...<br>
<div class="im"><br>
&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; So, all you need is to think a bit more broadly in a sense, how to<br>
&gt;&gt;&gt;&gt; improve system and remove crappy patterns from use,<br>
&gt;&gt;&gt;&gt; but not blindly replace one pattern by another , which replacing one<br>
&gt;&gt;&gt;&gt; flood with another.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If you can show a pattern for this which has comparable performance with<br>
&gt;&gt;&gt; the<br>
&gt;&gt;&gt; current implementation, then I&#39;m all ears.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Since when performance became the only criteria for reasoning about<br>
&gt;&gt; implementation quality?<br>
&gt;<br>
&gt; Who said it&#39;s the only criteria (besides you)?<br>
&gt; Btw, the previous implementation of this method was slow. It annoyed me so<br>
&gt; much that I changed it to the current implememtation which uses<br>
&gt; allObjectsDo: and is 22x faster for a Trunk image.<br>
&gt;<br>
<br>
</div>Why then to not change the implementation?<br>
Why you fighting with imlementation being slow, without getting<br>
interested why it implemented in such manner,<br>
which is the main reason why its so slow.<br>
<br>
Did you asked yourself, why cleaning up the undo commands in morphs is<br>
responsibility of SmalltalkImage class ??<br>
Why it is not responsibility of morphic world/project.<br>
<br>
So, yeah.. keep fighting with consequences instead of dealing with cause.<br>
<div><div></div><div class="h5"><br>
&gt;<br>
&gt; Levente<br>
<br>
<br>
<br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</div></div></blockquote></div><br>