[Pharo-project] Issue 3981 in pharo: #<= on SourcedMethodReference is very slow
Status: Accepted Owner: marcus.d...@gmail.com New issue 3981 by marcus.d...@gmail.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 ... as it accesses the sources. (it slows down rendering "senders of" a lot. And there I wonder why we sort them for time at all?)
Updates: Cc: johanbri...@me.com Benjamin...@gmail.com Comment #1 on issue 3981 by marianopeck: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 (No comment was entered for this change.)
Comment #2 on issue 3981 by johanbri...@me.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 It probably needs improvement (it's an extension of the method it overrides in MethodReference) But I doubt that the time comparison plays because if the method references in a "senders of" window will never have to be compared for timestamp, because the class and/or selector are already different. Otherwise said: the time comparison is only done for methods that have identical class/selector.
Comment #3 on issue 3981 by ryd...@gmail.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 Sure they do, if class is identical, but selector not. ^ self methodSymbol = aSourceReference methodSymbol ifTrue:[true] ifFalse:[self time <= aSourceReference time] is just... wrong. I believe it means to be ^ self methodSymbol = aSourceReference methodSymbol ifTrue:[self time <= aSourceReference time] ifFalse:[self methodSymbol < aSourceReference methodSymbol ]
Comment #4 on issue 3981 by johanbri...@me.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 indeed! it's just plain wrong.
Comment #5 on issue 3981 by ryd...@gmail.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 Better would prolly be ^(self methodSymbol < aSourceReference methodSymbol) or: [ (self methodSymbol = aSourceReference methodSymbol) and: [ self time <= aSourceReference time]] Well, depends on whether you like ifTrue: ifFalse: I guess :P Personally, I kinda like boolean logic.
Updates: Status: FixProposed Comment #6 on issue 3981 by johanbri...@me.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 Yes, I prefer that one too. I will leave the rest of the method using the ifTrue:ifFalse, just to keep it in sync with the overridden method code. For now, this stupid bug is fixed! thanks!
Updates: Labels: Milestone-1.3 Comment #7 on issue 3981 by marcus.d...@gmail.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 (No comment was entered for this change.)
Updates: Status: Closed Comment #8 on issue 3981 by marcus.d...@gmail.com: #<= on SourcedMethodReference is very slow http://code.google.com/p/pharo/issues/detail?id=3981 in 13159
participants (1)
-
pharo@googlecode.com