[Reflectivity] change regarding announcement in Pharo7

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

[Reflectivity] change regarding announcement in Pharo7

Marcus Denker-4
Hi,

One questionable (but practical) thing that MetaLinks have is that they announce (MetalinkChanged) when they are installed or uninstalled.
This is nice for being able to show them in the UI (and e.g. the Watcher implemented with them).

But it is very very slow… so I now made it an option:


it is by default off, but can be turned on reflectively at any point.


e.g. the link of the execution counter now looks like this:

link := MetaLink new 
metaObject: self;
selector: #increase;
optionAnnounce: true.

It has announcing enable so that the browser refreshes when it gets added or removed.

Marcus
Reply | Threaded
Open this post in threaded view
|

Re: [Reflectivity] change regarding announcement in Pharo7

Tudor Girba-2
Hi,

Interesting.

What exactly is slow? The installation of a meta link? How slower is it?

Cheers,
Doru


> On Mar 28, 2018, at 4:03 PM, Marcus Denker <[hidden email]> wrote:
>
> Hi,
>
> One questionable (but practical) thing that MetaLinks have is that they announce (MetalinkChanged) when they are installed or uninstalled.
> This is nice for being able to show them in the UI (and e.g. the Watcher implemented with them).
>
> But it is very very slow… so I now made it an option:
>
> https://github.com/pharo-project/pharo/pull/1160
>
> it is by default off, but can be turned on reflectively at any point.
>
>
> e.g. the link of the execution counter now looks like this:
>
> link := MetaLink new
> metaObject: self;
> selector: #increase;
> optionAnnounce: true.
>
> It has announcing enable so that the browser refreshes when it gets added or removed.
>
> Marcus

--
www.tudorgirba.com
www.feenk.com

"Speaking louder won't make the point worthier."


Reply | Threaded
Open this post in threaded view
|

Re: [Reflectivity] change regarding announcement in Pharo7

Marcus Denker-4


> On 29 Mar 2018, at 04:00, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
> Interesting.
>
> What exactly is slow? The installation of a meta link? How slower is it?
>
yes, as the IDE updates. I is really slow, to the point i did not even benchmark.
(just running the tests feels extremely slow, in Pharo6 getting slower the more browsers are open)

And the tests do not even install many links.

We could get numbers by running all tests before and after the patch.

        Marcus