1 Reply Latest reply on Jul 26, 2018 11:06 PM by Martin Sevenich-Oracle

    Performance Issues with Infomap on directed graphs


      Hi All,


      I am trying to run the communitiesInfomap algorithm on the following graph using embedded Pgx 2.7.0 from Java. It turns out that when I load the graph and call .undirect().simplify() the algorithm completes its execution in about 50s on my laptop. However, if I only call .simplify() after loading (that is, I do not call the undirect() method), the algorithm takes more than 48 minutes, when I decide to stop the execution. I would like to know if these numbers are reasonable (at least two orders of magnitude slower in the non-undirect case), or whether this could be caused by some sort of bug. The following is a small test to reproduce the aforementioned behavior:


      import oracle.pgx.api.*;
      import oracle.pgx.common.types.PropertyType;
      public class CDetectionTest {
          public static void main(String[] args) throws Exception {
              ServerInstance instance = Pgx.getInstance(Pgx.EMBEDDED_URL);
              PgxSession     session  = instance.createSession("Test Session");
              Analyst        analyst  = session.createAnalyst();
              PgxGraph graph = session.readGraphWithProperties("/home/aprat/projects/oracle/repository/dblp/original.json")
             PgxGraph graph = session.readGraphWithProperties("/home/aprat/projects/oracle/repository/dblp/original.json")
              VertexProperty<Long, Double> pageRankProperty = graph.createVertexProperty(PropertyType.DOUBLE,
              analyst.pagerank(graph, true, pageRankProperty);
              EdgeProperty<Double> weightProperty = graph.createEdgeProperty(PropertyType.DOUBLE, "weight");
              // Initializing weights to 1.0
              EdgeSet edges = graph.getEdges();
              for (PgxEdge e : edges) {
                  weightProperty.set(e, 1.0);
              VertexProperty<Long,Long> communityProperty = graph.createVertexProperty(PropertyType.LONG, "community");
              System.out.println("Starting Community Detection Algorithm");
              long start = System.currentTimeMillis();
              long end = System.currentTimeMillis();
              System.out.println("Community Detection Execution Time "+(end-start)+" ms");


      Message was edited by: ac617e5f-4c07-4bd5-845e-3cd9fbba9e49