Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Scroll link tables slow down the performance. (Read 9418 times)
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Scroll link tables slow down the performance.
Oct 7th, 2009 at 7:45am
Print Post  
Hi,

I am using LinkTables for source and destination row mappings.

Both the tables contain huge data and the number of links.


I scroll the table on MouseWheelListener event and set the current row of the table using tableNotde.setCurrentRow().

It works perfect for small data but gets hang for a second for large data.

It seems the row is getting set but the diagram doesn't get refresh faster.

For huge data with no links it works faster.

How can I improve the scrolling

Thanks.
« Last Edit: Oct 7th, 2009 at 9:24am by Mrini »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #1 - Oct 7th, 2009 at 10:22am
Print Post  
Hi,

Are you using link auto-routing? It might slow-down scrolling if there are a lot of links connected to the tables.

Stoyan
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #2 - Oct 7th, 2009 at 10:51am
Print Post  
Hi Stoyan,

   Yes there are lot of links between the two tables.

Is there any way to improve the performance of tableNode.setCurrentRow()  in such a case?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #3 - Oct 7th, 2009 at 10:58am
Print Post  
If using auto-routing, you could disable it and call the Route method only for links that are within the currently visible range of table rows.
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #4 - Oct 7th, 2009 at 12:51pm
Print Post  
Hi Stoyan,

         I am not using auto-routing.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #5 - Oct 7th, 2009 at 1:50pm
Print Post  
Are you using the LinkCrossings property? It does a lot of calculations too.
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #6 - Oct 7th, 2009 at 2:21pm
Print Post  
Nope,

I am using only following properties.

diagram.setAllowSelfLoops(false);
diagram.setDynamicLinks(true);
diagram.setRestrictItemsToBounds(RestrictToBounds.InsideOnly);
diagram.setSnapToAnchor(SnapToAnchor.OnCreateOrModify);





  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #7 - Oct 8th, 2009 at 7:35am
Print Post  
So how many links are there? Could you email the diagram xml to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #8 - Oct 9th, 2009 at 5:37am
Print Post  
Hi Stoyan,

     Near about 6000 links are there.

     I can not send the xml as I am populating links through ArrayList manipulations.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #9 - Oct 12th, 2009 at 12:24pm
Print Post  
We tried some optimizations, but the speed with 6000 links improved only slightly:
https://mindfusion.eu/_beta/jdiag_scrolltbl.zip

It might get a bit faster also if you disable the Dynamic property of links, and hide their arrowheads.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #10 - Oct 12th, 2009 at 12:41pm
Print Post  
Additionally, didn't you have some code that hides links that are not in the currently visible range of rows? For best performance, you could change that to create / remove links, instead of show / hide them.
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #11 - Dec 29th, 2009 at 12:53pm
Print Post  
Hi Stoyan ,

Remove and redraw links works perfect for performance issue rather than show / hide.

thanks . Smiley


But now another issue arise.

For calculating the row hight for rows in a linktable for fixed width I'm first setting the text to ShapeNode , assigning the width and applying the property shapeNode.resizeToFitText(FitSize.KeepWidth);

then assigning that ShapeNode hight to a row.

It works fine for normal text ,  but for chinise text it takes lot of time to set the text to shapeNode and resize it.

so for 7000-8000 rows it takes 30-40 mins to calculate the row hight whereas for normal text it takes 1 min.

Can you please help me out.

thanks.
 

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Scroll link tables slow down the performance.
Reply #12 - Dec 29th, 2009 at 4:23pm
Print Post  
Could you save one such table with Chinese texts to an xml file and email it to support@mindfusion.eu?
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #13 - Jan 7th, 2010 at 5:20am
Print Post  
Hi Stoyan.

    I resolved the issue using JTextArea instead of Shapenode.

Anyways Thanks for the quick response.
Smiley
  
Back to top
 
IP Logged
 
Mrini
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 34
Joined: Aug 18th, 2009
Re: Scroll link tables slow down the performance.
Reply #14 - Mar 25th, 2010 at 8:17am
Print Post  
Hi Stoyan,
     I am facing the same issue again of calculating the row height for wrapping the text into a linktable cell as JTextara doesn't work well on Linux.

I need to use shapnode for the height calculation but the issue with shapnode is it take time to render chinese text.

Is there any other way for height calculation or how can I improve the performance using shapnode.

Sorry, you requested for xml file but I could not send as I am not able to save it to xml due to some jar conflicts.

Thanks.

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint