I have some projects that add descriptions to Object, so this
optimization would break certain things.
Lukas
Following your mail I checked a couple of things, and found a
significant bug in my optimization.....
Putting a breakpoint in #build: when it calls allSelectors shows that it
works through the selectors of the following chain of classes!
PRComponent class
PRStructure class
PRDecorated class
PRObject class
Object class
and also it continues to
ProtoObject class
Class
ClassDescription
Behavior
Object
ProtoObject
If we are only looking at the class side then thats a lot of selectors
which we are not interested in
myPRComponent class allSelectors size 1075.
(myPRComponent class allSelectorsBelow: Object) size. 577
(myPRComponent class allSelectorsBelow: ProtoObject class) size 50.
before
[ 1000 timesRepeat: [MADescriptionBuilder default build: (ProductData) ]
] timeToRun. 21622
after
[ 1000 timesRepeat: [MADescriptionBuilder default build: (ProductData) ]
] timeToRun. 1717
best regards
Keith