Glamour Mondrian panel updateOn:from: bug

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

Glamour Mondrian panel updateOn:from: bug

jfabry
Hi Doru, all

I am having a problem with the Mondrian panel in AspectMaps using an updateOn:from:. (See code below for details of the glamour script) I saw that on each update the update progressively gets slower. About double the time to be exact. I added some debugging code to the visualization to check this and ... on each update the mondrian drawing is painted double the amount of time than before: 1, 2, 4, 8, ... Poking around in the debugger shows the old pane is indeed not removed from the subscriptions list leading to doubling the amount of panes in the list on each refresh.

I suppose there is a simple fix for this so if you could fix it I would very much appreciate it! :-)


mondrianPaneOn: browser
        |num|
        num :=0.
        browser transmit to: #mpanel; from: #models; andShow: [:a |
                a mondrian
                        painting: [:view :model |
                                Transcript show: '+'.
                                model isNil ifFalse: [ <DO THE PAINTING>]].
                                Transcript show: num; cr. num := num + 1];
                        updateOn: AMModelChanged from: [:ent | self announcer ];
                        allowNil ].


--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Mondrian panel updateOn:from: bug

EstebanLM
Hi,
yes... that would be the #492 issue (updates not being unsubscribe and for that, re-executed every time)

Cheers,
Esteban

El 16/01/2011, a las 3:59p.m., Johan Fabry escribió:

> Hi Doru, all
>
> I am having a problem with the Mondrian panel in AspectMaps using an updateOn:from:. (See code below for details of the glamour script) I saw that on each update the update progressively gets slower. About double the time to be exact. I added some debugging code to the visualization to check this and ... on each update the mondrian drawing is painted double the amount of time than before: 1, 2, 4, 8, ... Poking around in the debugger shows the old pane is indeed not removed from the subscriptions list leading to doubling the amount of panes in the list on each refresh.
>
> I suppose there is a simple fix for this so if you could fix it I would very much appreciate it! :-)
>
>
> mondrianPaneOn: browser
> |num|
> num :=0.
> browser transmit to: #mpanel; from: #models; andShow: [:a |
> a mondrian
> painting: [:view :model |
> Transcript show: '+'.
> model isNil ifFalse: [ <DO THE PAINTING>]].
> Transcript show: num; cr. num := num + 1];
> updateOn: AMModelChanged from: [:ent | self announcer ];
> allowNil ].
>
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Mondrian panel updateOn:from: bug

Tudor Girba
Johan, thanks for reporting.

Esteban, the problem is related to 492, but it does not appear to be the same because the problem still fails in the case of Mondrian. I added a test for this:

GLMMondrianMorphicTest>>testUnregisterFromAnnouncementsWhenUpdating

The test fails both with and without your fixes. Funny enough, when having a text or list presentation it works as expected even with and without the fixes:

GLMTextMorphicTest>>testUnregisterFromAnnouncementsWhenUpdating


I also added the unregistration in GLMCompositePresentation>>clear because this is what gets called when we replace the presentations in a pane, but it still does not solve the problem.

It would be so great if I would get another pair of eyes on this problem. I hope that these problems will go away when we will have Weak Announcements. Actually, does anyone want to help with those?


Cheers,
Doru


On 16 Jan 2011, at 20:31, Esteban Lorenzano wrote:

> Hi,
> yes... that would be the #492 issue (updates not being unsubscribe and for that, re-executed every time)
>
> Cheers,
> Esteban
>
> El 16/01/2011, a las 3:59p.m., Johan Fabry escribió:
>
>> Hi Doru, all
>>
>> I am having a problem with the Mondrian panel in AspectMaps using an updateOn:from:. (See code below for details of the glamour script) I saw that on each update the update progressively gets slower. About double the time to be exact. I added some debugging code to the visualization to check this and ... on each update the mondrian drawing is painted double the amount of time than before: 1, 2, 4, 8, ... Poking around in the debugger shows the old pane is indeed not removed from the subscriptions list leading to doubling the amount of panes in the list on each refresh.
>>
>> I suppose there is a simple fix for this so if you could fix it I would very much appreciate it! :-)
>>
>>
>> mondrianPaneOn: browser
>> |num|
>> num :=0.
>> browser transmit to: #mpanel; from: #models; andShow: [:a |
>> a mondrian
>> painting: [:view :model |
>> Transcript show: '+'.
>> model isNil ifFalse: [ <DO THE PAINTING>]].
>> Transcript show: num; cr. num := num + 1];
>> updateOn: AMModelChanged from: [:ent | self announcer ];
>> allowNil ].
>>
>>
>> --
>> Johan Fabry  
>> [hidden email] - http://dcc.uchile.cl/~jfabry
>> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Problem solving efficiency grows with the abstractness level of problem understanding."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Mondrian panel updateOn:from: bug

jfabry
In reply to this post by EstebanLM

Ah sorry, I have not been paying attention to that discussion. Any news about a fix ? ;-)

On 16 Jan 2011, at 16:31, Esteban Lorenzano wrote:

> Hi,
> yes... that would be the #492 issue (updates not being unsubscribe and for that, re-executed every time)
>
> Cheers,
> Esteban

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Mondrian panel updateOn:from: bug

EstebanLM
no, I found the problem, but still not a real worthy solution... so I'm looking for ideas (any one is welcome :) )

Cheers,
Esteban

El 16/01/2011, a las 6:51p.m., Johan Fabry escribió:

>
> Ah sorry, I have not been paying attention to that discussion. Any news about a fix ? ;-)
>
> On 16 Jan 2011, at 16:31, Esteban Lorenzano wrote:
>
>> Hi,
>> yes... that would be the #492 issue (updates not being unsubscribe and for that, re-executed every time)
>>
>> Cheers,
>> Esteban
>
> --
> Johan Fabry  
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Glamour Mondrian panel updateOn:from: bug

EstebanLM
In reply to this post by Tudor Girba
oh... :(
well... need to keep looking then

Cheers,
Esteban

El 16/01/2011, a las 6:48p.m., Tudor Girba escribió:

> Johan, thanks for reporting.
>
> Esteban, the problem is related to 492, but it does not appear to be the same because the problem still fails in the case of Mondrian. I added a test for this:
>
> GLMMondrianMorphicTest>>testUnregisterFromAnnouncementsWhenUpdating
>
> The test fails both with and without your fixes. Funny enough, when having a text or list presentation it works as expected even with and without the fixes:
>
> GLMTextMorphicTest>>testUnregisterFromAnnouncementsWhenUpdating
>
>
> I also added the unregistration in GLMCompositePresentation>>clear because this is what gets called when we replace the presentations in a pane, but it still does not solve the problem.
>
> It would be so great if I would get another pair of eyes on this problem. I hope that these problems will go away when we will have Weak Announcements. Actually, does anyone want to help with those?
>
>
> Cheers,
> Doru
>
>
> On 16 Jan 2011, at 20:31, Esteban Lorenzano wrote:
>
>> Hi,
>> yes... that would be the #492 issue (updates not being unsubscribe and for that, re-executed every time)
>>
>> Cheers,
>> Esteban
>>
>> El 16/01/2011, a las 3:59p.m., Johan Fabry escribió:
>>
>>> Hi Doru, all
>>>
>>> I am having a problem with the Mondrian panel in AspectMaps using an updateOn:from:. (See code below for details of the glamour script) I saw that on each update the update progressively gets slower. About double the time to be exact. I added some debugging code to the visualization to check this and ... on each update the mondrian drawing is painted double the amount of time than before: 1, 2, 4, 8, ... Poking around in the debugger shows the old pane is indeed not removed from the subscriptions list leading to doubling the amount of panes in the list on each refresh.
>>>
>>> I suppose there is a simple fix for this so if you could fix it I would very much appreciate it! :-)
>>>
>>>
>>> mondrianPaneOn: browser
>>> |num|
>>> num :=0.
>>> browser transmit to: #mpanel; from: #models; andShow: [:a |
>>> a mondrian
>>> painting: [:view :model |
>>> Transcript show: '+'.
>>> model isNil ifFalse: [ <DO THE PAINTING>]].
>>> Transcript show: num; cr. num := num + 1];
>>> updateOn: AMModelChanged from: [:ent | self announcer ];
>>> allowNil ].
>>>
>>>
>>> --
>>> Johan Fabry  
>>> [hidden email] - http://dcc.uchile.cl/~jfabry
>>> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of problem understanding."
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev