<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 16, 2017 at 3:09 PM, Jakob Reschke <span dir="ltr"><<a href="mailto:jakob.reschke@student.hpi.de" target="_blank">jakob.reschke@student.hpi.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">Hi,<div dir="auto"><br></div><div dir="auto">I almost expected this feedback regarding allInstances ;-) If the change is still only in the Inbox, no harm should have been done, otherwise somebody else should revert it in trunk.</div></div></blockquote><div><br></div><div>OK, good :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto">An alternative would be to enumerate only the Environments registered in that class pool variable. It requires everyone to use the correct "constructor" though, when the Environment is set up.<br></div></div></blockquote><div><br></div><div>Surely an Environment is installed in some other environment, much like a class being installed in its superclass, and hence being present in its superclass's subclasses array.  Hence one can enumerate all classes starting from the thisClass's of the subclasses of Class class (see Class class>>rootsOfTheWorld).</div><div><br></div><div>BTW, rootsOfTheWorld is currently defined as</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto"><br></div><div dir="auto">For the sake of learning some more: I have plenty of garbage environments in my image (due to test cases creating them and references I will have to track down at another time), but the allInstancesDo does not remarkably slow down the navigation features for me. Which cases do you have in mind when you say that it does not scale?</div></div></blockquote><div><br></div><div>Multi-gigabyte 64-bit images.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><br></div><div dir="auto">Best,</div><div dir="auto">Jakob</div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">Am 16.05.2017 23:21 schrieb "Eliot Miranda" <<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>>:<br type="attribution"></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div dir="ltr">Hi Jakob,
<div><br>
</div>
<div><br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote"><span class="">On Tue, May 16, 2017 at 10:09 AM, <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br>
</span><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
A new version of System was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/System-jr.948.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/inbox<wbr>/System-jr.948.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: System-jr.948<br>
Author: jr<br>
Time: 5 May 2017, 12:08:58.857884 am<br>
UUID: 4a19b143-6a23-b549-ab15-0d548d<wbr>a859f4<br>
Ancestors: System-ul.947<br>
<br>
incorporate behaviors from other environments in allBehaviorsDo:<br>
<br>
This enables senders/implementors and method searches across environments.<br>
<br>
=============== Diff against System-ul.947 ===============<br>
<br>
Item was changed:<br>
  ----- Method: SystemNavigation>>allBehaviors<wbr>Do: (in category 'query') -----<br>
  allBehaviorsDo: aBlock<br>
        "Evaluate the argument, aBlock, for each kind of Behavior in the system<br>
        (that is, Object and its subclasses and Traits).<br>
        ar 7/15/1999: The code below will not enumerate any obsolete or anonymous<br>
        behaviors for which the following should be executed:<br>
<br>
                Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].<br>
<br>
        but what follows is way faster than enumerating all objects."<br>
<br>
+       Environment allInstancesDo: [:environment |<br>
+               environment allClassesAndTraitsDo: [ :class |<br>
+                       aBlock value: class.<br>
+                       class isTrait ifFalse: [ "class of a Trait is Trait, there are no MetaTraits"<br>
+                               aBlock value: class class ] ] ]!<br>
-       self environment allClassesAndTraitsDo: [ :class |<br>
-               aBlock value: class.<br>
-               class isTrait ifFalse: [ "class of a Trait is Trait, there are no MetaTraits"<br>
-                       aBlock value: class class ] ]!<br>
</blockquote>
<div><br>
</div>
</div></div><span class=""><div>Forgive me for being blunt but Environment allInstancesDo: is absurd and unacceptable.  Environments *must* build some kind of graph that can be enumerated without recourse to a hammer like allInstancesDo:.  This simply doesn't scale.  And it suffers the
 problem of enumerating environments that are no longer in use but have yet to be garbage collected.  Please roll back this change and take a better approach.</div>
<div><br>
</div>
</span></div>
<div class="m_-2511317019720172929m_123561147477942795m_-6762673259426350850gmail_signature" data-smartmail="gmail_signature">
<div dir="ltr">
<div><span style="font-size:small;border-collapse:separate">
<div>_,,,^..^,,,_<br>
</div>
<div>best, Eliot</div>
</span></div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div></div>
<br><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>