On 24.07.2011, at 18:42, Hilaire Fernandes wrote:
Andreas,
As we are writing about bogus, you can explain me one aspect of the profile I found hard to interpret. If you look at this profile snippet (I hope it will print in a readable form):
| | 16.7% {2692ms} DrGeo>>updateDirtyCostumes | | 16.6% {2686ms} DrGAngle3PointsCostume(DrGMathItemCostume)>>update | | 10.4% {1674ms} DrGAngle3PointsCostume>>redraw | | |9.4% {1513ms} DrGAngle3PointsCostume>>redrawShape | | | 9.3% {1496ms} DrGAngle3PointsCostume>>redrawArc | | | 9.2% {1485ms} DrGArcMorph>>center:radius:origin:length: | | | 8.6% {1395ms} DrGArcMorph(PolygonMorph)>>computeBounds | | | 7.8% {1255ms} DrGArcMorph(PolygonMorph)>>curveBounds | | | 7.6% {1231ms} DrGArcMorph(PolygonMorph)>>lineSegmentsDo: | | | 7.2% {1162ms} DrGArcMorph(PolygonMorph)>>coefficients | | | 4.3% {687ms} Cubic>>bestSegments | | | 2.8% {447ms} Cubic>>calcEnoughSegments | | | |1.8% {297ms} Cubic>>enough:withMeasure:withIn: | | | | 1.8% {291ms} Cubic>>measureFor: | | | | 1.6% {251ms} Cubic(SequenceableCollection)>>polynomialEval: | | | 1.5% {239ms} Cubic>>honeIn: | | 3.1% {501ms} DrGSegmentCostume>>redraw
The way the message calls are nested in the profile result, for me it says: DrGSegmentCostume>>redraw is called in the context of DrGAngle3PointsCostume(DrGMathItemCostume)>>update which is absolutely not the case. So what is it?
The class in parenthesis indicates the actual compiled method executed. There is no DrGAngle3PointsCostume>>update but only DrGMathItemCostume>>update. DrGSegmentCostume also inherits #update from DrGMathItemCostume which sends "self redraw". So this looks confusing but okay to me.
Possibly MessageTally should count the different receiver classes separately. This is what Andreas alluded to - it's the same compiled method but different receiver classes for the method context.
- Bert -