Skip to main content



      Home
Home » Eclipse Projects » Sirius » Depth-first traversal problem in large-scale model
Depth-first traversal problem in large-scale model [message #1773064] Wed, 20 September 2017 23:04 Go to next message
Eclipse UserFriend
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?
Re: Depth-first traversal problem in large-scale model [message #1773075 is a reply to message #1773064] Thu, 21 September 2017 03:24 Go to previous messageGo to next message
Eclipse UserFriend
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 08:46 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Depth-first traversal problem in large-scale model [message #1775840 is a reply to message #1773095] Mon, 06 November 2017 20:02 Go to previous message
Eclipse UserFriend
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.
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: Thu Jul 24 18:17:06 EDT 2025

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

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

Back to the top