2

I have a huge XML file (measuring nearly 2GB) formatted in the Graphml XML format for a social graph. While creating a new graph via

    graph = new GraphMLReader().readGraph("socialgraph.xml");

I get a "java.lang.OutOfMemoryError: Java heap space" exception Is there a way in prefuse to read the file, node by node. If not, can you recommend me some visualization toolkits that can handle such large sizes via XML or SQL databases.

kitwalker
  • 862
  • 1
  • 10
  • 29

1 Answers1

3

First thing I would suggest trying is increasing the amount of memory you are allocating the JVM. Add this JVM argument when you run the program:

-Xmx4g

See this related question for more information: Increase heap size in java

If you still have problems and want to try out a different visualization I would try gephi first.

Community
  • 1
  • 1
Binary Nerd
  • 13,872
  • 4
  • 42
  • 44
  • 1024 might not be enough given the file is double that... allow more if your machine can take it – mbatchkarov Mar 23 '12 at 00:52
  • You're correct, it was just an example, i'll amend the answer. The size of the file doesn't really indicate how many actual nodes and edges are in the graph. GraphML is usually quite verbose. – Binary Nerd Mar 23 '12 at 01:01
  • I was gonna try visone. It could read files upto 5000 nodes but performace really degraded after that. I'm looking at nearly a million nodes. – kitwalker Mar 23 '12 at 04:39
  • I'm interested to know what you will gain from visualizing a 1M node graph? If you want insight into the graph you should probably consider using something like Neo4j, NetworkX, JUNG etc. Gephi uses OpenGL and even that only aims to handle 50K nodes and 500K edges. – Binary Nerd Mar 23 '12 at 04:59
  • I was hoping to calculate nodes with high eigenvector centrality using different eigenvalues – kitwalker Mar 24 '12 at 12:59
  • In that case, you would be better off using NetworkX, Neo4j or JUNG I would think. – Binary Nerd Mar 24 '12 at 13:39