1
votes

I am using Neo4j 2.0.0M4 community edition with Node.js with https://github.com/thingdom/node-neo4j to access the Neo4j DB server over REST API by passing Cypher queries.

I have observed that the data returned by Neo4j from the webadmin of neo4j and even from the REST APi is pretty slow. for e.g. a query returning 900 records takes 1.2s and then subsequent runs take around 200ms. and similarly if the number of records go upto 27000 the query in the webadmin browser takes 21 sec.

I am wondering whats causing the REST API to be so slow and also how to go about improving the performance? a) It's using the CYPHER? the jSON parsing or b) the HTTP Overhead itself as similar query with 27000 records returned in mysql takes 11 ms

Any help is highly appreciated

1
Which requests are you executing? The first query will warm up the db-caches so it is slower (and has to be parsed too).Michael Hunger

1 Answers

3
votes

Neo4j 2.0 is currently a milestone build that is not yet performance optimized.

Consider enabling streaming and make sure you use parameterized Cypher.

For large result sets the browser consumes a lot of time for rendering. You might try the same query using cURL to see a difference.