Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Performance issue when setting ZTop() (Read 1830 times)
anurodhora
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 103
Joined: Jan 19th, 2009
Performance issue when setting ZTop()
Jun 4th, 2009 at 3:57pm
Print Post  
Hi Stoyo,

We have a label node attached to our main node and because we wanted that the diagram events like NodeDoubleClicked, NodeClicked etc. should always give us the main node as its argument in e.Node regardless of when mouse is over label node and we perform click action.

Therefore we set mainNode.Ztop() in our add node code. Doing this solved our above problem but has significantly degraded performance the application now loads more than twice as slow.

What can we do here please suggest. The label node is done as attached node so that we can move it around.

Thanks,
Anurodh
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Performance issue when setting ZTop()
Reply #1 - Jun 5th, 2009 at 4:41am
Print Post  
Just create the parent node after the child nodes when creating the groups, instead of updating the Z order later. Didn't the code from the post below work for you?
http://mindfusion.eu/Forum/YaBB.pl?board=wpfdg_disc;action=display;num=124335533...
  
Back to top
 
IP Logged
 
anurodhora
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 103
Joined: Jan 19th, 2009
Re: Performance issue when setting ZTop()
Reply #2 - Jun 5th, 2009 at 6:56am
Print Post  
Creating parent nodes after child nodes give us blank node issue - i.e. on first load, node contents are blank and when you click inside a node the contents for all the nodes come up. And the link you have given calls for code changes which are too much in our case.

What should we do in such a case.

Thanks,
Anurodh
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Performance issue when setting ZTop()
Reply #3 - Jun 5th, 2009 at 10:26am
Print Post  
Adding an if statement to several mouse related event handlers is not that much work. And how does mainNode.Ztop() not hide the children unless the main node is transparent? Anyway, the ZTop calls will work faster if you enclose all of them within a BeginInit - EndInit pair.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint