perf problems while resizing trees

View: New views
5 Messages — Rating Filter:   Alert me  

perf problems while resizing trees

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Cyril,

I used to have a problem while resizing a splitter that contained a
treeView. *** on IE only ***
I've seen great improvements with rialto V1 concerning this point.
However, there still seems to be something wrong.
Indeed, the problem still appears if you try to resize the splitter
for the first time and that your tree has already been expanded on,
lets say, 4 levels.

I mean that, if you first move the splitter, and only then, expand the
tree, then resizing the splitter again is very fast. But if the tree
has been expanded before you have tried to resize the splitter, then
the operation is very long.

Here's an example:
Step1:
1-Load the following code. (on IE)
2-Move the splitter -> it takes a long time
3-Once IE has finished working, move the splitter again -> this is fast

Step2:
1-Load the following code. (on IE)
2-Collapse all nodes.
3-Move the splitter -> fast operation
4-Expand all nodes
5-Move the splitter -> fast operation

        mySplitter = new
rialto.widget.Splitter({top:0,left:0,prop:0.25,orientation:'h',name:'mySplitter',parent:document.body,style:'3D',withImg:false,reverseClose:false});
        theTree = new rialto.widget.Tree({name:"theTree",
parent:mySplitter.div1, top:"40", left:"5", width:"100%",
height:"90%", withRoot:false, position:'relative'});
        fakeRoot =
theTree.createAndAddNode(theTree.id,{name:'fakeRoot',text:'hidden',info:'FakeRoot'},'');
        theRoot =
theTree.createAndAddNode(fakeRoot.id,{name:'theRoot',text:'Racine',open:true,info:'Root',reload:false},'');
        for(var i=0;i<3;i++) {
                var node =
theTree.createAndAddNode(theRoot.id,{name:'node'+i,text:'Node'+i,open:true,info:'aNode',reload:false},'');
                for(var j=0;j<3;j++) {
                        var node2 =
theTree.createAndAddNode(node.id,{name:'node'+i+'_'+j,text:'Node'+i+'_'+j,open:true,info:'aNode',reload:false},'');
                        for(var k=0;k<2;k++) {
                                var node3 =
theTree.createAndAddNode(node2.id,{name:'node'+i+'_'+j+'_'+k,text:'Node'+i+'_'+j+'_'+k,open:true,info:'aNode',reload:false},'');
                                for(var l=0;l<6;l++) {
                                        var node4 =
theTree.createAndAddNode(node3.id,{name:'node'+i+'_'+j+'_'+k+'_'+l,text:'Node'+i+'_'+j+'_'+k+'_'+l,open:true,info:'aNode',reload:false},'');
                                }
                        }
                }
        }

Thanks for your help.

Fred



Re: perf problems while resizing trees

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Fred,

I plan to work on the tree these folllowing days. I will have a look
on it and i keep you inform.

Cyril

--- In rialto-dev@..., "frederic_viollet"
<frederic.viollet@...> wrote:

>
> Hi Cyril,
>
> I used to have a problem while resizing a splitter that contained a
> treeView. *** on IE only ***
> I've seen great improvements with rialto V1 concerning this point.
> However, there still seems to be something wrong.
> Indeed, the problem still appears if you try to resize the splitter
> for the first time and that your tree has already been expanded on,
> lets say, 4 levels.
>
> I mean that, if you first move the splitter, and only then, expand the
> tree, then resizing the splitter again is very fast. But if the tree
> has been expanded before you have tried to resize the splitter, then
> the operation is very long.
>
> Here's an example:
> Step1:
> 1-Load the following code. (on IE)
> 2-Move the splitter -> it takes a long time
> 3-Once IE has finished working, move the splitter again -> this is fast
>
> Step2:
> 1-Load the following code. (on IE)
> 2-Collapse all nodes.
> 3-Move the splitter -> fast operation
> 4-Expand all nodes
> 5-Move the splitter -> fast operation
>
> mySplitter = new
>
rialto.widget.Splitter({top:0,left:0,prop:0.25,orientation:'h',name:'mySplitter',parent:document.body,style:'3D',withImg:false,reverseClose:false});
> theTree = new rialto.widget.Tree({name:"theTree",
> parent:mySplitter.div1, top:"40", left:"5", width:"100%",
> height:"90%", withRoot:false, position:'relative'});
> fakeRoot =
>
theTree.createAndAddNode(theTree.id,{name:'fakeRoot',text:'hidden',info:'FakeRoot'},'');
> theRoot =
>
theTree.createAndAddNode(fakeRoot.id,{name:'theRoot',text:'Racine',open:true,info:'Root',reload:false},'');
> for(var i=0;i<3;i++) {
> var node =
>
theTree.createAndAddNode(theRoot.id,{name:'node'+i,text:'Node'+i,open:true,info:'aNode',reload:false},'');
> for(var j=0;j<3;j++) {
> var node2 =
>
theTree.createAndAddNode(node.id,{name:'node'+i+'_'+j,text:'Node'+i+'_'+j,open:true,info:'aNode',reload:false},'');
> for(var k=0;k<2;k++) {
> var node3 =
>
theTree.createAndAddNode(node2.id,{name:'node'+i+'_'+j+'_'+k,text:'Node'+i+'_'+j+'_'+k,open:true,info:'aNode',reload:false},'');
> for(var l=0;l<6;l++) {
> var node4 =
>
theTree.createAndAddNode(node3.id,{name:'node'+i+'_'+j+'_'+k+'_'+l,text:'Node'+i+'_'+j+'_'+k+'_'+l,open:true,info:'aNode',reload:false},'');
> }
> }
> }
> }
>
> Thanks for your help.
>
> Fred
>



Re: perf problems while resizing trees

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Fred,

I fixe the bug so i invite you to update your rialto.js file.
I also add a new option for the grid which is withContextualMenu. The
default value is false. for now i doesn't make any customization of
the contextual menu because i want to finalize this component first.

I also experiment a new way of loading the grid. Using the asynchLoad
constructor propertie you can add several line by the addOneLine
method. But the user will retrieve hand while the line are still
loading. The idea is to allow the user to start watching the result
before all the line has been load. I'm interresting by your feed back

Cyril



Re: perf problems while resizing trees

by frederic_viollet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Cyril,

It seems there is a problem on IE with the latest rialto.js.
Can you try the following code please:
mySplitter = new
rialto.widget.Splitter({top:0,left:0,prop:0.25,orientation:'h',name:'mySplitter',parent:document.body,style:'3D',withImg:false,reverseClose:false});

adminMiscFrame = new
rialto.widget.Frame({name:'adminMiscFrame',top:'0',left:'0',width:'100%',height:'100%',title:'
',open:true,dynamic:false,position:'absolute',draggable:false,parent:mySplitter.div2});
adminMiscFrame.setVisible(false);

displayModeCombo = new
rialto.widget.Combo([["PolicyOnly","PolicyOnly"],["RecDiff","RecDiff"]],"displayModeCombo",10,500,270,adminMiscFrame,{position:"absolute",heightItem:25,suggest:false,enable:true});

An error occurs on the
rialto.widget.AbstractComponent.prototype.setWidth function : width is
 The stack is:
->new rialto.widget.Combo ...
->rialto.widget.AbstractComponent.prototype.attach ...
->rialto.widget.AbstractComponent.prototype.afterAttach ...
->rialto.widget.AbstractComponent.prototype.adaptToContext ...
->rialto.widget.AbstractComponent.prototype.setWidth

It seems that the problem occurs because adminMiscFrame has been set
to "Not Visible" before I try to create the Combo in it.

Otherwise, the asynchLoad property seems to be an interesting option.
I didn't have time to test it but, in some circumstances , it could be
an appreciated feature.

Thanks,

Fred

--- In rialto-dev@..., "Cyril Balit" <cbalit@...> wrote:

>
> Hello Fred,
>
> I fixe the bug so i invite you to update your rialto.js file.
> I also add a new option for the grid which is withContextualMenu. The
> default value is false. for now i doesn't make any customization of
> the contextual menu because i want to finalize this component first.
>
> I also experiment a new way of loading the grid. Using the asynchLoad
> constructor propertie you can add several line by the addOneLine
> method. But the user will retrieve hand while the line are still
> loading. The idea is to allow the user to start watching the result
> before all the line has been load. I'm interresting by your feed back
>
> Cyril
>



Re: perf problems while resizing trees

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Fred,

I can't reproduce it. Make sur you also update your css files.

Cyril


--- In rialto-dev@..., "frederic_viollet"
<frederic.viollet@...> wrote:
>
> Hi Cyril,
>
> It seems there is a problem on IE with the latest rialto.js.
> Can you try the following code please:
> mySplitter = new
>
rialto.widget.Splitter({top:0,left:0,prop:0.25,orientation:'h',name:'mySplitter',parent:document.body,style:'3D',withImg:false,reverseClose:false});
>
> adminMiscFrame = new
>
rialto.widget.Frame({name:'adminMiscFrame',top:'0',left:'0',width:'100%',height:'100%',title:'
>
',open:true,dynamic:false,position:'absolute',draggable:false,parent:mySplitter.div2});
> adminMiscFrame.setVisible(false);
>
> displayModeCombo = new
>
rialto.widget.Combo([["PolicyOnly","PolicyOnly"],["RecDiff","RecDiff"]],"displayModeCombo",10,500,270,adminMiscFrame,{position:"absolute",heightItem:25,suggest:false,enable:true});

>
> An error occurs on the
> rialto.widget.AbstractComponent.prototype.setWidth function : width is
>  The stack is:
> ->new rialto.widget.Combo ...
> ->rialto.widget.AbstractComponent.prototype.attach ...
> ->rialto.widget.AbstractComponent.prototype.afterAttach ...
> ->rialto.widget.AbstractComponent.prototype.adaptToContext ...
> ->rialto.widget.AbstractComponent.prototype.setWidth
>
> It seems that the problem occurs because adminMiscFrame has been set
> to "Not Visible" before I try to create the Combo in it.
>
> Otherwise, the asynchLoad property seems to be an interesting option.
> I didn't have time to test it but, in some circumstances , it could be
> an appreciated feature.
>
> Thanks,
>
> Fred
>
> --- In rialto-dev@..., "Cyril Balit" <cbalit@> wrote:
> >
> > Hello Fred,
> >
> > I fixe the bug so i invite you to update your rialto.js file.
> > I also add a new option for the grid which is withContextualMenu. The
> > default value is false. for now i doesn't make any customization of
> > the contextual menu because i want to finalize this component first.
> >
> > I also experiment a new way of loading the grid. Using the asynchLoad
> > constructor propertie you can add several line by the addOneLine
> > method. But the user will retrieve hand while the line are still
> > loading. The idea is to allow the user to start watching the result
> > before all the line has been load. I'm interresting by your feed back
> >
> > Cyril
> >
>


LightInTheBox - Buy quality products at wholesale price