Large Genogram Graph

I built a Family tree Graph using the Genogram Layout as the basis. Everything works awesome and it looks great. The problem is that when the graph gets. large ~ >500 nodes, the browser grinds to a halt and crashes and cannot generate the layout.

Reading through the documentation it mentions that the LayeredDiGraph Layout is very slow compared to the other layouts. Also searching the forum, there is a mention that virtualization only helps with the number of nodes on screen, and the performance issue in the LayeredDiGraph is in the layout.

I ran the debug version in the performance profiler in Chrome and it looks like inside StraightenAndPack there is some code that is being run in On^2 times where n is the number of nodes which is causing the performance issues.

Any ideas on things I could do to allow the software to work with larger trees? Any help would be appreciated.

I have attached the output of a run that works, with a zoomed in area that shows where the layereddigraph is handling the marriage data which is why I am using the genorgram instead of the simpler family tree.

Also attaching a screenshot of the performance profiling output. Please let me know if there is any other information I can give.

Try setting LayeredDigraphLayout.packOption with different values to see if it helps.
Something like:

      $(go.Diagram, . . .,
            layout:  // use a custom layout, defined below
                { direction: 90, layerSpacing: 30, columnSpacing: 10,
                  packOption: go.LayeredDigraphLayout.PackMedian }),
            . . .

Well, the good news is that it does display all the data once you change the packOption, but unfortunately it makes the graph un readable as far as who is a parent-child of who

Have you tried other combinations of the packOption flags?

Also, I’m surprised that there would be a crash – it might take longer than you’d like, but it should work. Could you show me the stack trace when the exception happens? Or does the browser tab crash, leaving no opportunity for debugging?

Sorry, I misspoke, It doesn’t crash with an excpetion, Chrome gives a page stopped responding error and asks to close the tab