[Squeak-dev] Slowdown with required methods...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Squeak-dev] Slowdown with required methods...

Alexandre Bergel-3
Hello,

As you probably noticed, the 'required' dynamic protocol slows down  
the code browsing.
The method DynamicProtocols class>>collectAllProtocolsOnClass: aClass  
has the following comment:
"Returns a collection of all dynamic protocols that should be displayed
        for the current class.
        Only non-empty protocols are returned"

Although it makes sense to display non-empty protocols only,  
DPRequired makes a significant slowdown because required methods have  
to be computed to determine if this dynamic protocol has to be  
displayed or not.

What about defining a hasRequiredMethod in Behavior? I guess this  
will remove the slowdown...

Regards,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




Reply | Threaded
Open this post in threaded view
|

Re: [Squeak-dev] Slowdown with required methods...

Damien Cassou-3
2007/6/4, Alexandre Bergel <[hidden email]>:
> Although it makes sense to display non-empty protocols only,
> DPRequired makes a significant slowdown because required methods have
> to be computed to determine if this dynamic protocol has to be
> displayed or not.
>
> What about defining a hasRequiredMethod in Behavior? I guess this
> will remove the slowdown...

Hi Alexandre,

I think the problem comes from the non-optimal algorithm which
computes the required methods. The algorithm must cache its result and
answer efficiently. The problem is that I don't have enough knowledge
to correct it. It's the Nathanael's algorithm which is included in
3.9.

Bye

--
Damien Cassou