title: What could cause this poor performance of neo4j?
body: <p>In our stack, we use neo4j and have encountered classical performance issues : application is slow as hell as soon as it requires data from <a href="http://neo4j.org/" rel="nofollow noreferrer">neo4j</a>.</p>
  
  <p>Listening only my courage (pun intended) I started JVisualVM and done a profiling of application.</p>
  
  <p>This application is hosted in a JavaEE server (Glassfish) and uses a quasi-semantic stack made of <a href="https://github.com/mhgrove/Empire" rel="nofollow noreferrer">Empire-RDF</a>, <a href="https://github.com/tinkerpop/blueprints/wiki/" rel="nofollow noreferrer">Blueprints</a>, and <a href="http://neo4j.org/" rel="nofollow noreferrer">neo4j</a>. Access to neo4j is offered by <a href="https://github.com/alexsmirnov/neo4j-connector" rel="nofollow noreferrer">JCA neo4j-connector</a>.</p>
  
  <p>Like this screenshot suggests, there is strong evidence that there is a bottleneck in neo4j data retrieval.</p>
  
  <p><img src="https://i.stack.imgur.com/00fFW.png" alt="Interesting fragments of a profiling session"></p>
  
  <p>My question is double, but simple.</p>
  
  <ol>
  <li>Is that performance level normal ? (I guess no)</li>
  <li>What can I do to improve those performances ?</li>
  </ol>
  
  <p><strong>EDIT</strong> here are some informations regarding the test procdure that should enlighten both of you.</p>
  
  <p>My graph structure is, to me, unknown : as I'm using Empire-RDF on top of Blueprints/Sesame/Neo4J, I only know the Java objects I'm manipulating, which are ten intereconnected classes, and they unfortunatly are at the very core of our buisness, so I can't disclose them.</p>
  
  <p>Consider, for the sake of this example, they create a tree of visual elements linked to entities representing URI targets.</p>
  
  <p>I have a maven test that runs a combination of read/write operation (I will say there is between 20 and 50 JPA operations involved). This maven test runs in 300 <strong>seconds</strong>.</p>
  
  <p>On a lower level, </p>
  
  <ul>
  <li>application is run on Windows-7 and Mac OS X 10.6, with various sub-versions of Java 1.6. </li>
  <li>Application is hosted on a Glassfish 3.1.1</li>
  <li>neo4j DB is version 1.5, accessed through <a href="https://github.com/alexsmirnov/neo4j-connector" rel="nofollow noreferrer">neo4j-connector</a> for JCA (there is no customization made to default settings).</li>
  <li>Sesame is version 2.6.0</li>
  <li>blueprints is version 1.1</li>
  <li>Empire-RDF is version 0.7</li>
  </ul>
  
  <p>As a last world, diving into jVisualVM sampler reveals most of the application time is spent in those <code>NodeManager#getNodeForProxy</code> calls.</p>