node: forIt: in Roassal takes too long

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

node: forIt: in Roassal takes too long

Usman Bhatti
Hello,

I am trying to arrange two sets of nodes in verticalLineLayout with Roassal, and within a set, the nodes are arranged in a gridLayout. The script below allows works fine except that the execution time is too long when the number of nodes is large and hence I am unable to achieve multi-layout visualization for large number of nodes. 

view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 10000).
view gridLayout.
].

view shape rectangle withoutBorder.
view node:#bbb forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].

view verticalLineLayout.

view open

Can you please have a look or could you suggest an alternate solution? I have created my own custom layout but that is tied to the structure of my nodes and hence not generic.

tx.
usman

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

Re: node: forIt: in Roassal takes too long

abergel
Hi Usman,

I am now under a heavy load of ecoop reviews. I will try to process your mail soon...

Alexandre


On Jan 28, 2013, at 2:47 PM, Usman Bhatti <[hidden email]> wrote:

> Hello,
>
> I am trying to arrange two sets of nodes in verticalLineLayout with Roassal, and within a set, the nodes are arranged in a gridLayout. The script below allows works fine except that the execution time is too long when the number of nodes is large and hence I am unable to achieve multi-layout visualization for large number of nodes.
>
> view := ROMondrianViewBuilder new.
> view shape rectangle withoutBorder.
> view node:#aaa forIt:[
> view shape rectangle.
> view nodes: (1 to: 10000).
> view gridLayout.
> ].
>
> view shape rectangle withoutBorder.
> view node:#bbb forIt:[
> view shape rectangle.
> view nodes: (1 to: 1000).
> view gridLayout.
> ].
>
> view verticalLineLayout.
>
> view open
>
> Can you please have a look or could you suggest an alternate solution? I have created my own custom layout but that is tied to the structure of my nodes and hence not generic.
>
> tx.
> usman
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

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



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

Re: node: forIt: in Roassal takes too long

Ben Coman
In reply to this post by Usman Bhatti
Usman Bhatti wrote:

> Hello,
>
> I am trying to arrange two sets of nodes in verticalLineLayout with
> Roassal, and within a set, the nodes are arranged in a gridLayout. The
> script below allows works fine except that the execution time is too long
> when the number of nodes is large and hence I am unable to achieve
> multi-layout visualization for large number of nodes.
>
> view := ROMondrianViewBuilder new.
> view shape rectangle withoutBorder.
> view node:#aaa forIt:[
> view shape rectangle.
> view nodes: (1 to: 10000).
> view gridLayout.
> ].
>
> view shape rectangle withoutBorder.
> view node:#bbb forIt:[
> view shape rectangle.
> view nodes: (1 to: 1000).
> view gridLayout.
> ].
>
> view verticalLineLayout.
>
> view open
>
> Can you please have a look or could you suggest an alternate solution? I
> have created my own custom layout but that is tied to the structure of my
> nodes and hence not generic.
>
> tx.
> usman
>  

I am probably breaking some rules by directly using some private parts
of Roassal, but for 1000 items I managed to reduce the execution time
from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
The script at the bottom gives the following result for the standard
operation of Roassal...
----
3857 tallies, 3867 msec.
65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
  65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
    65.1% {2518ms} ROGridLayout>>doExecute:
      65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
        65.1% {2517ms} ROElement>>translateTo:
          65.1% {2516ms} ROElement>>translateBy:
            65.1% {2516ms} ROElement>>adjustSizeIfNecessary
              65.1% {2516ms} ROExtensibleParent>>on:
                65.1% {2516ms} ROAdjustSizeOfNesting
class(ROAbstractAdjustSize class)>>on:
33.9% {1310ms} ROElement>>addedInAnElement:
  33.8% {1306ms} ROElement>>adjustSizeIfNecessary
----

Note that 98.9% of the time was spent in
ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
ROAdjustSizeOfNesting is removed from the 1000 loop by including the two
commented parts of the script, giving the following result...
----
38 tallies, 38 msec.
42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
  42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
    42.1% {16ms} ROGridLayout>>doExecute:
      36.8% {14ms} RODirectLayoutTranslator>>translate:to:
        36.8% {14ms} ROElement>>translateTo:
          34.2% {13ms} ROElement>>translateBy:
15.8% {6ms} ROElement(ROAbstractComponent)>>+
   15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
   13.2% {5ms} ROElement>>initialize
10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
----

So here is the script for you to try. I have used 'raw' Roassal API
rather than the Mondrian API since that is what I am more familiar with
from working on my own application the past 9 months.   Its a bit more
verbose but I feel I have more control and more insight into the
architecture.
----
|view outer|
view := ROView new.
MessageTally spyOn:
[    2 timesRepeat:
    [    view add: (outer := ROElement new "resizeStrategy:
ROFixedSizedParent new") + ROBorder .
        1 to: 1000 do:
        [    :node |
            outer add: (ROBorder elementOn: node) .
        ].
        ROGridLayout on: outer elements.
        "ROAdjustSizeOfNesting on: outer."
    ].
].
ROVerticalLineLayout on: view elements.
view open.
----

Apart from the obvious speed benefit, Alexandre can comment on how I'm
abusing the architecture ;)

cheers -ben


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

Re: node: forIt: in Roassal takes too long

Ben Coman
Usman,  How did this go for you?

Ben Coman wrote:

> Usman Bhatti wrote:
>> Hello,
>>
>> I am trying to arrange two sets of nodes in verticalLineLayout with
>> Roassal, and within a set, the nodes are arranged in a gridLayout. The
>> script below allows works fine except that the execution time is too
>> long
>> when the number of nodes is large and hence I am unable to achieve
>> multi-layout visualization for large number of nodes.
>>
>> view := ROMondrianViewBuilder new.
>> view shape rectangle withoutBorder.
>> view node:#aaa forIt:[
>> view shape rectangle.
>> view nodes: (1 to: 10000).
>> view gridLayout.
>> ].
>>
>> view shape rectangle withoutBorder.
>> view node:#bbb forIt:[
>> view shape rectangle.
>> view nodes: (1 to: 1000).
>> view gridLayout.
>> ].
>>
>> view verticalLineLayout.
>>
>> view open
>>
>> Can you please have a look or could you suggest an alternate solution? I
>> have created my own custom layout but that is tied to the structure
>> of my
>> nodes and hence not generic.
>>
>> tx.
>> usman
>>  
>
> I am probably breaking some rules by directly using some private parts
> of Roassal, but for 1000 items I managed to reduce the execution time
> from 3867 msec down to 38 msec, then also with 10000 items down to 182
> msec.
> The script at the bottom gives the following result for the standard
> operation of Roassal...
> ----
> 3857 tallies, 3867 msec.
> 65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
>  65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
>    65.1% {2518ms} ROGridLayout>>doExecute:
>      65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
>        65.1% {2517ms} ROElement>>translateTo:
>          65.1% {2516ms} ROElement>>translateBy:
>            65.1% {2516ms} ROElement>>adjustSizeIfNecessary
>              65.1% {2516ms} ROExtensibleParent>>on:
>                65.1% {2516ms} ROAdjustSizeOfNesting
> class(ROAbstractAdjustSize class)>>on:
> 33.9% {1310ms} ROElement>>addedInAnElement:
>  33.8% {1306ms} ROElement>>adjustSizeIfNecessary
> ----
>
> Note that 98.9% of the time was spent in
> ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
> ROAdjustSizeOfNesting is removed from the 1000 loop by including the
> two commented parts of the script, giving the following result...
> ----
> 38 tallies, 38 msec.
> 42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
>  42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
>    42.1% {16ms} ROGridLayout>>doExecute:
>      36.8% {14ms} RODirectLayoutTranslator>>translate:to:
>        36.8% {14ms} ROElement>>translateTo:
>          34.2% {13ms} ROElement>>translateBy:
> 15.8% {6ms} ROElement(ROAbstractComponent)>>+
>   15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
> 13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
>   13.2% {5ms} ROElement>>initialize
> 10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
> ----
>
> So here is the script for you to try. I have used 'raw' Roassal API
> rather than the Mondrian API since that is what I am more familiar
> with from working on my own application the past 9 months.   Its a bit
> more verbose but I feel I have more control and more insight into the
> architecture. ----
> |view outer|
> view := ROView new.
> MessageTally spyOn:
> [    2 timesRepeat:
>    [    view add: (outer := ROElement new "resizeStrategy:
> ROFixedSizedParent new") + ROBorder .
>        1 to: 1000 do:
>        [    :node |
>            outer add: (ROBorder elementOn: node) .
>        ].
>        ROGridLayout on: outer elements.
>        "ROAdjustSizeOfNesting on: outer."
>    ].
> ].
> ROVerticalLineLayout on: view elements.
> view open.
> ----
>
> Apart from the obvious speed benefit, Alexandre can comment on how I'm
> abusing the architecture ;)
>
> cheers -ben
>
>
> _______________________________________________
> 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: node: forIt: in Roassal takes too long

Usman Bhatti
Hello Ben,

During the past week, I was busy with other things so I couldn't integrate your fix. I'll try it today to let you know how it goes.

usman


On Sun, Feb 3, 2013 at 3:54 PM, Ben Coman <[hidden email]> wrote:
Usman,  How did this go for you?


Ben Coman wrote:
Usman Bhatti wrote:
Hello,

I am trying to arrange two sets of nodes in verticalLineLayout with
Roassal, and within a set, the nodes are arranged in a gridLayout. The
script below allows works fine except that the execution time is too long
when the number of nodes is large and hence I am unable to achieve
multi-layout visualization for large number of nodes.

view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 10000).
view gridLayout.
].

view shape rectangle withoutBorder.
view node:#bbb forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].

view verticalLineLayout.

view open

Can you please have a look or could you suggest an alternate solution? I
have created my own custom layout but that is tied to the structure of my
nodes and hence not generic.

tx.
usman
 

I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
The script at the bottom gives the following result for the standard operation of Roassal...
----
3857 tallies, 3867 msec.
65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
 65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
   65.1% {2518ms} ROGridLayout>>doExecute:
     65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
       65.1% {2517ms} ROElement>>translateTo:
         65.1% {2516ms} ROElement>>translateBy:
           65.1% {2516ms} ROElement>>adjustSizeIfNecessary
             65.1% {2516ms} ROExtensibleParent>>on:
               65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
33.9% {1310ms} ROElement>>addedInAnElement:
 33.8% {1306ms} ROElement>>adjustSizeIfNecessary
----

Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
----
38 tallies, 38 msec.
42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
 42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
   42.1% {16ms} ROGridLayout>>doExecute:
     36.8% {14ms} RODirectLayoutTranslator>>translate:to:
       36.8% {14ms} ROElement>>translateTo:
         34.2% {13ms} ROElement>>translateBy:
15.8% {6ms} ROElement(ROAbstractComponent)>>+
  15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
  13.2% {5ms} ROElement>>initialize
10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
----

So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----
|view outer|
view := ROView new.
MessageTally spyOn:
[    2 timesRepeat:
   [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
       1 to: 1000 do:
       [    :node |
           outer add: (ROBorder elementOn: node) .
       ].
       ROGridLayout on: outer elements.
       "ROAdjustSizeOfNesting on: outer."
   ].
].
ROVerticalLineLayout on: view elements.
view open.
----

Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)

cheers -ben


_______________________________________________
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


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

Re: node: forIt: in Roassal takes too long

Usman Bhatti
In reply to this post by Ben Coman



On Tue, Jan 29, 2013 at 2:19 PM, Ben Coman <[hidden email]> wrote:
Usman Bhatti wrote:
Hello,

I am trying to arrange two sets of nodes in verticalLineLayout with
Roassal, and within a set, the nodes are arranged in a gridLayout. The
script below allows works fine except that the execution time is too long
when the number of nodes is large and hence I am unable to achieve
multi-layout visualization for large number of nodes.

view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 10000).
view gridLayout.
].

view shape rectangle withoutBorder.
view node:#bbb forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].

view verticalLineLayout.

view open

Can you please have a look or could you suggest an alternate solution? I
have created my own custom layout but that is tied to the structure of my
nodes and hence not generic.

tx.
usman
 

I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
The script at the bottom gives the following result for the standard operation of Roassal...
----
3857 tallies, 3867 msec.
65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
 65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
   65.1% {2518ms} ROGridLayout>>doExecute:
     65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
       65.1% {2517ms} ROElement>>translateTo:
         65.1% {2516ms} ROElement>>translateBy:
           65.1% {2516ms} ROElement>>adjustSizeIfNecessary
             65.1% {2516ms} ROExtensibleParent>>on:
               65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
33.9% {1310ms} ROElement>>addedInAnElement:
 33.8% {1306ms} ROElement>>adjustSizeIfNecessary
----

Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
----
38 tallies, 38 msec.
42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
 42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
   42.1% {16ms} ROGridLayout>>doExecute:
     36.8% {14ms} RODirectLayoutTranslator>>translate:to:
       36.8% {14ms} ROElement>>translateTo:
         34.2% {13ms} ROElement>>translateBy:
15.8% {6ms} ROElement(ROAbstractComponent)>>+
  15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
  13.2% {5ms} ROElement>>initialize
10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
----

So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----

Thx for looking into it. But it seems that the number of input nodes is modest :-).
When there are 1K nodes, Mondrian DSL (with 794 msec) is performing better than the raw API (with 2105 msec). I didn't look in further details, may there is a difference into how the scripts are written. 

When I try to execute your script on 10K nodes, the execution of the script never returns so every time I have to forcefully stop the execution (remember, it was the same problem with my Mondrian script as well). To me, it seems that the nesting of large number of children nodes is not properly handled in Roassal.

Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.

Usman

 
|view outer|
view := ROView new.
MessageTally spyOn:
[    2 timesRepeat:
   [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
       1 to: 1000 do:
       [    :node |
           outer add: (ROBorder elementOn: node) .
       ].
       ROGridLayout on: outer elements.
       "ROAdjustSizeOfNesting on: outer."
   ].
].
ROVerticalLineLayout on: view elements.
view open.
----

Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)

cheers -ben



_______________________________________________
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: node: forIt: in Roassal takes too long

Tudor Girba-2
Hi Usman,

Please just report the issue on the moose issue tracker.

Cheers,
Doru


On Feb 5, 2013, at 5:58 PM, Usman Bhatti <[hidden email]> wrote:

>
>
>
> On Tue, Jan 29, 2013 at 2:19 PM, Ben Coman <[hidden email]> wrote:
> Usman Bhatti wrote:
> Hello,
>
> I am trying to arrange two sets of nodes in verticalLineLayout with
> Roassal, and within a set, the nodes are arranged in a gridLayout. The
> script below allows works fine except that the execution time is too long
> when the number of nodes is large and hence I am unable to achieve
> multi-layout visualization for large number of nodes.
>
> view := ROMondrianViewBuilder new.
> view shape rectangle withoutBorder.
> view node:#aaa forIt:[
> view shape rectangle.
> view nodes: (1 to: 10000).
> view gridLayout.
> ].
>
> view shape rectangle withoutBorder.
> view node:#bbb forIt:[
> view shape rectangle.
> view nodes: (1 to: 1000).
> view gridLayout.
> ].
>
> view verticalLineLayout.
>
> view open
>
> Can you please have a look or could you suggest an alternate solution? I
> have created my own custom layout but that is tied to the structure of my
> nodes and hence not generic.
>
> tx.
> usman
>  
>
> I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
> The script at the bottom gives the following result for the standard operation of Roassal...
> ----
> 3857 tallies, 3867 msec.
> 65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
>  65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
>    65.1% {2518ms} ROGridLayout>>doExecute:
>      65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
>        65.1% {2517ms} ROElement>>translateTo:
>          65.1% {2516ms} ROElement>>translateBy:
>            65.1% {2516ms} ROElement>>adjustSizeIfNecessary
>              65.1% {2516ms} ROExtensibleParent>>on:
>                65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
> 33.9% {1310ms} ROElement>>addedInAnElement:
>  33.8% {1306ms} ROElement>>adjustSizeIfNecessary
> ----
>
> Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
> ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
> ----
> 38 tallies, 38 msec.
> 42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
>  42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
>    42.1% {16ms} ROGridLayout>>doExecute:
>      36.8% {14ms} RODirectLayoutTranslator>>translate:to:
>        36.8% {14ms} ROElement>>translateTo:
>          34.2% {13ms} ROElement>>translateBy:
> 15.8% {6ms} ROElement(ROAbstractComponent)>>+
>   15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
> 13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
>   13.2% {5ms} ROElement>>initialize
> 10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
> ----
>
> So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----
>
> Thx for looking into it. But it seems that the number of input nodes is modest :-).
> When there are 1K nodes, Mondrian DSL (with 794 msec) is performing better than the raw API (with 2105 msec). I didn't look in further details, may there is a difference into how the scripts are written.
>
> When I try to execute your script on 10K nodes, the execution of the script never returns so every time I have to forcefully stop the execution (remember, it was the same problem with my Mondrian script as well). To me, it seems that the nesting of large number of children nodes is not properly handled in Roassal.
>
> Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.
>
> Usman
>
>  
> |view outer|
> view := ROView new.
> MessageTally spyOn:
> [    2 timesRepeat:
>    [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
>        1 to: 1000 do:
>        [    :node |
>            outer add: (ROBorder elementOn: node) .
>        ].
>        ROGridLayout on: outer elements.
>        "ROAdjustSizeOfNesting on: outer."
>    ].
> ].
> ROVerticalLineLayout on: view elements.
> view open.
> ----
>
> Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)
>
> cheers -ben
>
>
>
> _______________________________________________
> 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

"Presenting is storytelling."


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

Re: node: forIt: in Roassal takes too long

abergel
In reply to this post by Usman Bhatti
Sure, in the moose bugs tracker please...

Alexandre


On Feb 5, 2013, at 1:58 PM, Usman Bhatti <[hidden email]> wrote:

> Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.

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



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

Re: node: forIt: in Roassal takes too long

abergel
In reply to this post by Usman Bhatti
Hi Usman and Ben,

Roassal 1.302 is now much faster for inner nodes.

-=-=-=-=-=-=-=-=-=-=
[view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].] timeToRun
=> 652 (Before 1.302)
=> 16 (with 1.302)
-=-=-=-=-=-=-=-=-=-=

Thanks Ben for the tip! Well spotted!

Alexandre


On Feb 5, 2013, at 1:58 PM, Usman Bhatti <[hidden email]> wrote:

>
>
>
> On Tue, Jan 29, 2013 at 2:19 PM, Ben Coman <[hidden email]> wrote:
> Usman Bhatti wrote:
> Hello,
>
> I am trying to arrange two sets of nodes in verticalLineLayout with
> Roassal, and within a set, the nodes are arranged in a gridLayout. The
> script below allows works fine except that the execution time is too long
> when the number of nodes is large and hence I am unable to achieve
> multi-layout visualization for large number of nodes.
>
> view := ROMondrianViewBuilder new.
> view shape rectangle withoutBorder.
> view node:#aaa forIt:[
> view shape rectangle.
> view nodes: (1 to: 10000).
> view gridLayout.
> ].
>
> view shape rectangle withoutBorder.
> view node:#bbb forIt:[
> view shape rectangle.
> view nodes: (1 to: 1000).
> view gridLayout.
> ].
>
> view verticalLineLayout.
>
> view open
>
> Can you please have a look or could you suggest an alternate solution? I
> have created my own custom layout but that is tied to the structure of my
> nodes and hence not generic.
>
> tx.
> usman
>  
>
> I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
> The script at the bottom gives the following result for the standard operation of Roassal...
> ----
> 3857 tallies, 3867 msec.
> 65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
>  65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
>    65.1% {2518ms} ROGridLayout>>doExecute:
>      65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
>        65.1% {2517ms} ROElement>>translateTo:
>          65.1% {2516ms} ROElement>>translateBy:
>            65.1% {2516ms} ROElement>>adjustSizeIfNecessary
>              65.1% {2516ms} ROExtensibleParent>>on:
>                65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
> 33.9% {1310ms} ROElement>>addedInAnElement:
>  33.8% {1306ms} ROElement>>adjustSizeIfNecessary
> ----
>
> Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
> ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
> ----
> 38 tallies, 38 msec.
> 42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
>  42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
>    42.1% {16ms} ROGridLayout>>doExecute:
>      36.8% {14ms} RODirectLayoutTranslator>>translate:to:
>        36.8% {14ms} ROElement>>translateTo:
>          34.2% {13ms} ROElement>>translateBy:
> 15.8% {6ms} ROElement(ROAbstractComponent)>>+
>   15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
> 13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
>   13.2% {5ms} ROElement>>initialize
> 10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
> ----
>
> So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----
>
> Thx for looking into it. But it seems that the number of input nodes is modest :-).
> When there are 1K nodes, Mondrian DSL (with 794 msec) is performing better than the raw API (with 2105 msec). I didn't look in further details, may there is a difference into how the scripts are written.
>
> When I try to execute your script on 10K nodes, the execution of the script never returns so every time I have to forcefully stop the execution (remember, it was the same problem with my Mondrian script as well). To me, it seems that the nesting of large number of children nodes is not properly handled in Roassal.
>
> Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.
>
> Usman
>
>  
> |view outer|
> view := ROView new.
> MessageTally spyOn:
> [    2 timesRepeat:
>    [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
>        1 to: 1000 do:
>        [    :node |
>            outer add: (ROBorder elementOn: node) .
>        ].
>        ROGridLayout on: outer elements.
>        "ROAdjustSizeOfNesting on: outer."
>    ].
> ].
> ROVerticalLineLayout on: view elements.
> view open.
> ----
>
> Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)
>
> cheers -ben
>
>
>
> _______________________________________________
> 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

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




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

Re: node: forIt: in Roassal takes too long

Ben Coman
Thats really great. Thanks Alex.
It will be a little while before I can try it out, but I look forward to that time.

cheers -ben

Alexandre Bergel wrote:
Hi Usman and Ben,

Roassal 1.302 is now much faster for inner nodes.

-=-=-=-=-=-=-=-=-=-=
[view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].] timeToRun 
=> 652 (Before 1.302)
=> 16 (with 1.302)
-=-=-=-=-=-=-=-=-=-=

Thanks Ben for the tip! Well spotted!

Alexandre


On Feb 5, 2013, at 1:58 PM, Usman Bhatti [hidden email] wrote:

  

On Tue, Jan 29, 2013 at 2:19 PM, Ben Coman [hidden email] wrote:
Usman Bhatti wrote:
Hello,

I am trying to arrange two sets of nodes in verticalLineLayout with
Roassal, and within a set, the nodes are arranged in a gridLayout. The
script below allows works fine except that the execution time is too long
when the number of nodes is large and hence I am unable to achieve
multi-layout visualization for large number of nodes.

view := ROMondrianViewBuilder new.
view shape rectangle withoutBorder.
view node:#aaa forIt:[
view shape rectangle.
view nodes: (1 to: 10000).
view gridLayout.
].

view shape rectangle withoutBorder.
view node:#bbb forIt:[
view shape rectangle.
view nodes: (1 to: 1000).
view gridLayout.
].

view verticalLineLayout.

view open

Can you please have a look or could you suggest an alternate solution? I
have created my own custom layout but that is tied to the structure of my
nodes and hence not generic.

tx.
usman
  

I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
The script at the bottom gives the following result for the standard operation of Roassal...
----
3857 tallies, 3867 msec.
65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
 65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
   65.1% {2518ms} ROGridLayout>>doExecute:
     65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
       65.1% {2517ms} ROElement>>translateTo:
         65.1% {2516ms} ROElement>>translateBy:
           65.1% {2516ms} ROElement>>adjustSizeIfNecessary
             65.1% {2516ms} ROExtensibleParent>>on:
               65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
33.9% {1310ms} ROElement>>addedInAnElement:
 33.8% {1306ms} ROElement>>adjustSizeIfNecessary
----

Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
----
38 tallies, 38 msec.
42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
 42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
   42.1% {16ms} ROGridLayout>>doExecute:
     36.8% {14ms} RODirectLayoutTranslator>>translate:to:
       36.8% {14ms} ROElement>>translateTo:
         34.2% {13ms} ROElement>>translateBy:
15.8% {6ms} ROElement(ROAbstractComponent)>>+
  15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
  13.2% {5ms} ROElement>>initialize
10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
----

So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----

Thx for looking into it. But it seems that the number of input nodes is modest :-).
When there are 1K nodes, Mondrian DSL (with 794 msec) is performing better than the raw API (with 2105 msec). I didn't look in further details, may there is a difference into how the scripts are written. 

When I try to execute your script on 10K nodes, the execution of the script never returns so every time I have to forcefully stop the execution (remember, it was the same problem with my Mondrian script as well). To me, it seems that the nesting of large number of children nodes is not properly handled in Roassal.

Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.

Usman

 
|view outer|
view := ROView new.
MessageTally spyOn:
[    2 timesRepeat:
   [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
       1 to: 1000 do:
       [    :node |
           outer add: (ROBorder elementOn: node) .
       ].
       ROGridLayout on: outer elements.
       "ROAdjustSizeOfNesting on: outer."
   ].
].
ROVerticalLineLayout on: view elements.
view open.
----

Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)

cheers -ben



_______________________________________________
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
    

  


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

Re: node: forIt: in Roassal takes too long

stephane ducasse
In reply to this post by abergel
alex what was the problem?

Stef

On Apr 7, 2013, at 6:26 AM, Alexandre Bergel <[hidden email]> wrote:

> Hi Usman and Ben,
>
> Roassal 1.302 is now much faster for inner nodes.
>
> -=-=-=-=-=-=-=-=-=-=
> [view := ROMondrianViewBuilder new.
> view shape rectangle withoutBorder.
> view node:#aaa forIt:[
> view shape rectangle.
> view nodes: (1 to: 1000).
> view gridLayout.
> ].] timeToRun
> => 652 (Before 1.302)
> => 16 (with 1.302)
> -=-=-=-=-=-=-=-=-=-=
>
> Thanks Ben for the tip! Well spotted!
>
> Alexandre
>
>
> On Feb 5, 2013, at 1:58 PM, Usman Bhatti <[hidden email]> wrote:
>
>>
>>
>>
>> On Tue, Jan 29, 2013 at 2:19 PM, Ben Coman <[hidden email]> wrote:
>> Usman Bhatti wrote:
>> Hello,
>>
>> I am trying to arrange two sets of nodes in verticalLineLayout with
>> Roassal, and within a set, the nodes are arranged in a gridLayout. The
>> script below allows works fine except that the execution time is too long
>> when the number of nodes is large and hence I am unable to achieve
>> multi-layout visualization for large number of nodes.
>>
>> view := ROMondrianViewBuilder new.
>> view shape rectangle withoutBorder.
>> view node:#aaa forIt:[
>> view shape rectangle.
>> view nodes: (1 to: 10000).
>> view gridLayout.
>> ].
>>
>> view shape rectangle withoutBorder.
>> view node:#bbb forIt:[
>> view shape rectangle.
>> view nodes: (1 to: 1000).
>> view gridLayout.
>> ].
>>
>> view verticalLineLayout.
>>
>> view open
>>
>> Can you please have a look or could you suggest an alternate solution? I
>> have created my own custom layout but that is tied to the structure of my
>> nodes and hence not generic.
>>
>> tx.
>> usman
>>
>>
>> I am probably breaking some rules by directly using some private parts of Roassal, but for 1000 items I managed to reduce the execution time from 3867 msec down to 38 msec, then also with 10000 items down to 182 msec.
>> The script at the bottom gives the following result for the standard operation of Roassal...
>> ----
>> 3857 tallies, 3867 msec.
>> 65.1% {2518ms} ROGridLayout(ROLayout)>>applyOn:
>> 65.1% {2518ms} ROGridLayout(ROLayout)>>executeOnElements:
>>   65.1% {2518ms} ROGridLayout>>doExecute:
>>     65.1% {2517ms} RODirectLayoutTranslator>>translate:to:
>>       65.1% {2517ms} ROElement>>translateTo:
>>         65.1% {2516ms} ROElement>>translateBy:
>>           65.1% {2516ms} ROElement>>adjustSizeIfNecessary
>>             65.1% {2516ms} ROExtensibleParent>>on:
>>               65.1% {2516ms} ROAdjustSizeOfNesting class(ROAbstractAdjustSize class)>>on:
>> 33.9% {1310ms} ROElement>>addedInAnElement:
>> 33.8% {1306ms} ROElement>>adjustSizeIfNecessary
>> ----
>>
>> Note that 98.9% of the time was spent in ROElement>>adjustSizeIfNecessary and ROAdjustSizeOfNesting class>>on:
>> ROAdjustSizeOfNesting is removed from the 1000 loop by including the two commented parts of the script, giving the following result...
>> ----
>> 38 tallies, 38 msec.
>> 42.1% {16ms} ROGridLayout(ROLayout)>>applyOn:
>> 42.1% {16ms} ROGridLayout(ROLayout)>>executeOnElements:
>>   42.1% {16ms} ROGridLayout>>doExecute:
>>     36.8% {14ms} RODirectLayoutTranslator>>translate:to:
>>       36.8% {14ms} ROElement>>translateTo:
>>         34.2% {13ms} ROElement>>translateBy:
>> 15.8% {6ms} ROElement(ROAbstractComponent)>>+
>>  15.8% {6ms} ROElement(ROAbstractComponent)>>addShape:
>> 13.2% {5ms} ROElement class(ROAbstractComponent class)>>on:
>>  13.2% {5ms} ROElement>>initialize
>> 10.5% {4ms} ROAdjustSizeOfNesting class>>getNewRectangleFor:
>> ----
>>
>> So here is the script for you to try. I have used 'raw' Roassal API rather than the Mondrian API since that is what I am more familiar with from working on my own application the past 9 months.   Its a bit more verbose but I feel I have more control and more insight into the architecture. ----
>>
>> Thx for looking into it. But it seems that the number of input nodes is modest :-).
>> When there are 1K nodes, Mondrian DSL (with 794 msec) is performing better than the raw API (with 2105 msec). I didn't look in further details, may there is a difference into how the scripts are written.
>>
>> When I try to execute your script on 10K nodes, the execution of the script never returns so every time I have to forcefully stop the execution (remember, it was the same problem with my Mondrian script as well). To me, it seems that the nesting of large number of children nodes is not properly handled in Roassal.
>>
>> Alex, do you want us to report Roassal-related bugs in the Moose issues list or you have a separate list for that? Even if these are not correctly immediately, there should be a place which contains the knowledge about the known issues in Roassal.
>>
>> Usman
>>
>>
>> |view outer|
>> view := ROView new.
>> MessageTally spyOn:
>> [    2 timesRepeat:
>>   [    view add: (outer := ROElement new "resizeStrategy: ROFixedSizedParent new") + ROBorder .
>>       1 to: 1000 do:
>>       [    :node |
>>           outer add: (ROBorder elementOn: node) .
>>       ].
>>       ROGridLayout on: outer elements.
>>       "ROAdjustSizeOfNesting on: outer."
>>   ].
>> ].
>> ROVerticalLineLayout on: view elements.
>> view open.
>> ----
>>
>> Apart from the obvious speed benefit, Alexandre can comment on how I'm abusing the architecture ;)
>>
>> cheers -ben
>>
>>
>>
>> _______________________________________________
>> 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
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> 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