[Pharo-project] about morphic analysis done at ESUG
Marcus do you have a smalll notes we took when we perform the morphic analysis so that we can turn into instance variables some of the ugly valuesAt: Then do you think that we should turn the Dictionary in extension into "RBFastDictionary"? If yes can you point me to that class? and better open an issue? Stef
On 05.09.2008, at 09:11, Stéphane Ducasse wrote:
Marcus do you have a smalll notes we took when we perform the morphic analysis so that we can turn into instance variables some of the ugly valuesAt:
Morph>>fillStyle is called on every mouse-move event. these are called either on mouse-move or repaint: hasDropShadow shadowOffset hasRolloverBorder shadowColor MorphExtension>>layoutFrame layoutPolicy I'm sure there are more... Morphic spends >30% of it's time in property/dictionary code.
Then do you think that we should turn the Dictionary in extension into "RBFastDictionary"? I tried that once, would be interesting to experiment with that again.
RBSmallDictionary, it's part of the AST package: RBSmallDictionary is a special dictionary optimized for small collections. In addition to the normal dictionary protocol, it also supports an #empty message which "empties" the collection but may hang on to the original elements (so it could collect garbage). Without #empty we would either need to create a new dictionary or explicitly remove everything from the dictionary. Both of these take more time and #empty. Or implement the properties in MorphExtension directly with an array. Ned Konz did that in the past and claimed a 20% speedup...
If yes can you point me to that class? and better open an issue?
To really fix this will be some work. Some properties should be instance variables, and the property code needs to be checked if it can be improved for performance. With the amount of properties used in morphic, one wonders why they never put that into the language as a first class (and fast) concept? Marcus -- Marcus Denker -- denker@iam.unibe.ch http://www.iam.unibe.ch/~denker
participants (2)
-
Marcus Denker -
Stéphane Ducasse