JUNG can not display large graphics?

I use JUNG for the project, and when I show relatively large graphs, for example 1500 nodes, my computer will not be able to process it (graphs are displayed, but if I want to move around the graph, the system becomes very slow). Any suggestions.

+4
source share
3 answers

So, there are two things that JUNG visualization doesn't always scale very well right now:

  • iterative power layouts
  • : figuring out which node or edge (if any) refers to hover and click events.

It looks like you're working now.

Depending on your requirements, you have several options:

  • (a) disable mouse events or at least hover events
  • (b) hack into the visualization system so that the target search for the event is not O (m + n).

Simple solutions for (b) basically just split the viewport into small pieces and send events only to those elements that are in the same fragment as the pointer. (Obviously, the less pieces you make, the more memory is required.)

We had plans to do (b) (and the design sketched) for a while, but they worked on other things. Anyone who wants to help with a more permanent solution, please contact me.

+2
source

How much memory do you start with your virtual machine? Assuming your work on windows, looking at the Task Manager, does the VM remove the maximum amount of allocated memory and start using swap?

+2
source

The problem probably lies in calculating the positions of your vertices. The only layout I found easy enough to calculate is the tree layout and obviously is not suitable for all datasets.

Perhaps the solution is to write your own custom layout with much less calculations than FRLayout.

0
source

Source: https://habr.com/ru/post/1302568/


All Articles