Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Depth-first traversal problem in large-scale model
Depth-first traversal problem in large-scale model [message #1773064] Thu, 21 September 2017 03:04 Go to next message
mind calm is currently offline mind calmFriend
Messages: 57
Registered: July 2017
Member
Hi
I'm testing a large-scale model in Sirius. I met a StackOverflowError problem.
It's because the function AutoSizeAndRegionAwareGraphLayout.recursiveHandleVirtualNode(NodeList, EdgeList, VirtualNodesToNodes, Set, Set) uses depth-first traversal algorithm.
Is there any alternative solutions use breadth-first?


Best regards!

by Keep Mind Calm
Re: Depth-first traversal problem in large-scale model [message #1773075 is a reply to message #1773064] Thu, 21 September 2017 07:24 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Breadth-first can be dreadful too but in differently large models.

The real solution is probably to change from stack recursion with 1000's possibly 10000's of bytes per recursion to a worklist/set recursion with 8/60 bytes per element; just an 8 byte index if an existing list is already available, or a bit more if a lazy Iterable is used.

Regards

Ed Willink
Re: Depth-first traversal problem in large-scale model [message #1773095 is a reply to message #1773075] Thu, 21 September 2017 12:46 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Agreed with Ed. The code in question is in Sirius, but was originally lifted from GMF Runtime (CompositeDirectedGraphLayout) to add some customizations, so the stack usage issue is probably present there.

"mind calm", can you open a bugzilla for this? If possible with more details about what you mean by "large-scale model", or even better, a sample project with which we can reproduce the issue.

Regards,
Pierre-Charles


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Depth-first traversal problem in large-scale model [message #1775840 is a reply to message #1773095] Tue, 07 November 2017 01:02 Go to previous message
mind calm is currently offline mind calmFriend
Messages: 57
Registered: July 2017
Member
Hi, Pierre-Charles

I opend a bug at https://bugs.eclipse.org/bugs/show_bug.cgi?id=526884

And i attached the xtext model and log of call stack.


Best regards!

by Keep Mind Calm
Previous Topic:Find out if the Arrange All or Arrange Selection is called
Next Topic:Use External Java Action in Create Instance
Goto Forum:
  


Current Time: Fri Apr 26 16:57:07 GMT 2024

Powered by FUDForum. Page generated in 0.02809 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top