Dynamic Protocols in the Dev-images

Damien Cassou damien.cassou at gmail.com
Thu Jan 31 10:31:11 UTC 2008


Hi Zulq,

I don't have time to invest in this project. However, the repository
is open. Feel free to commit anything you think appropriate. If you
made any progress, let me know. Ask me any question you might have on
the code, I'll be very happy to answer. I think that is it quite
simple and there is not much code (most of the computation is done by
another project which I didn't write).

Thank you

On Jan 30, 2008 5:59 PM, Zulq Alam <me at zulq.net> wrote:
> Hi Damien,
>
> I like the dynamic protocols but don't use them because of the
> performance impact.
>
> I was curious and profiled it. It looks like the local send cache is not
> being used as no interests are being declared.
>
> In the code below I declare interest in everything. I'm not sure about
> the ramifications of this.
>
> When cached it is almost usable - perhaps with some tweaking this
> excellent feature could be more widely used.
>
> Regards,
> Zulq.
>
> protocols := DynamicProtocols allAvailableProtocols.
> class := Object.
>
> " clear caches "
> protocols asArray collect: [:dp | dp invalidateCache].
> LocalSends current initialize.
>
> TimeProfileBrowser spyOn: [protocols
>                 collect: [:dpClass | dpClass on: aClass]
>                 thenSelect: [:dp | (dp getSelectorsFor: Object) notEmpty]].
> " 9.69 seconds "
>
> TimeProfileBrowser spyOn: [protocols
>                 collect: [:dpClass | dpClass on: aClass]
>                 thenSelect: [:dp | (dp getSelectorsFor: Object) notEmpty]].
> " 6.44 seconds - improvement from caches in dynamic protocols themselves"
>
> " declare interest in everything (maybe wrong) "
> LocalSends current
>         noteInterestOf: nil in: ProtoObject;
>         noteInterestOf: nil inAll: ProtoObject allSubclasses.
>
> " prime local send caches "
> TimeProfileBrowser spyOn: [protocols
>                 collect: [:dpClass | dpClass on: aClass]
>                 thenSelect: [:dp | (dp getSelectorsFor: Object) notEmpty]].
> "6.49 seconds "
>
> " local sends cached "
> TimeProfileBrowser spyOn: [protocols
>                 collect: [:dpClass | dpClass on: aClass]
>                 thenSelect: [:dp | (dp getSelectorsFor: Object) notEmpty]].
> "0.69 seconds "
>
>
>
> Damien Cassou wrote:
> > Hi,
> >
> > as the developer of both the Dynamic Protocols and the dev-images, I
> > have included the firsts into the latter some times ago. I found them
> > quite useful at that time. However, they slow down a lot the UI (which
> > is already very slow). So, my question is:
> >
> > Who wants me to continue including the dynamic protocols in the dev-images?
> >
> >
> > Is there anyone using them?
> >
> > Bye
> >
>
>
>



-- 
Damien Cassou



More information about the Squeak-dev mailing list