Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Performance issue while loading more thank 100 node (Read 1429 times)
Suman
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jun 28th, 2019
Performance issue while loading more thank 100 node
Jul 10th, 2019 at 9:53am
Print Post  
Trying to load 137 nodes with 170 edges is taking a long time to load the diagram.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Performance issue while loading more thank 100 node
Reply #1 - Jul 10th, 2019 at 6:33pm
Print Post  
Code
Select All
$(document).ready(function ()
{
	var start = Date.now();

	var diagram = Diagram.create($("#diagram")[0]);
	for (var i = 0; i < 137; i++)
		diagram.getFactory().createShapeNode((i % 8) * 50, Math.floor(i / 8) * 50, 30, 30);
	for (var i = 0; i < 170; i++)
		diagram.getFactory().createDiagramLink(
			diagram.nodes[i % 136], diagram.nodes[(i + 1) % 136]);

	diagram.fromJson(
		diagram.toJson());

	console.log(Date.now() - start + " milliseconds");
}); 



takes 553 milliseconds for me.
  
Back to top
 
IP Logged
 
Suman
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jun 28th, 2019
Re: Performance issue while loading more thank 100 node
Reply #2 - Jul 11th, 2019 at 5:40am
Print Post  
Hi Slavcho,

Thanks for the reply. Can you please share your email id. So that I can share my json over email.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Performance issue while loading more thank 100 node
Reply #3 - Jul 11th, 2019 at 9:38am
Print Post  
Hi,

You could attach it to a private message, or email to support inbox at our domain.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Performance issue while loading more thank 100 node
Reply #4 - Jul 12th, 2019 at 7:55am
Print Post  
This JSON contains some custom CINode type. If I replace its instances with MindFusion.Diagramming.ShapeNode, the diagram loads immediately, so you should debug the delay in the CINode code.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint