Stan Shepherd wrote: > Pharo image: Pharo | Pharo-core > PharoCore1.0rc1 Latest update: #10502 > VM: unix - i686 - linux-gnu - Pharo0.1 of 16 May 2008 [latest update: > #10074] > > Steps to reproduce: > 1.[Object allSubInstances size inspect] timeToRun 375479 (6 minutes) > > with fix > [Object allSubInstances size inspect] timeToRun 22335 (22 seconds) > > Attached treats Object as a special case, and takes advantage of primitive > in SystemNavigation>>allObjectsDo:
It looks like with this change, Object allSubInstances would return instances of classes that do not inherit from Object, for instance objects that inherit from ProtoObject. Perhaps the special case should go on ProtoObject? Or a test could be made of how many subclasses a class has, and if it's over some arbitrary number just iterate through all objects and test each one for isKindOf:? Don't know how fast that would be, maybe it's not faster. But probably slow is preferable to incorrect. If you just want "all objects" and don't care about their class then you can always use SystemNavigation>>allObjectsDo: rather than allSubInstances. Regards, -Martin _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
