Search code examples
c#neo4jcyphergraph-databasesneo4jclient

neo4j REST API poor performance


According to my benchmark of creating nodes using

GraphClient.Create()

performance leaves much to be desired. I've got about 10 empty nodes per second on my machine (Core i3, 8 GB RAM).

Even when I use multithreading to perform create time to each Create() call speed icreases linearly (~N times when used N threads).

I've tested both stable 1.9.2 and 2.0.0-M04. The results exactly the same.

Does anybody know what's wrong?

EDIT: I tried to use neo4j REST API and I got similar results: ~ 20 empty nodes per second and multithreading also gives no benefits.

EDIT 2: At the same time Batch REST API, that allows batch creations provides much better performance: about 250 nodes per second. It looks like there is incredible big overhead in handling single request...


Solution

  • Poor performance caused by overhead in processing RESTful Cypher query. Mostly it is network overhead but overhead caused by need to parse query also exists.

    Use Core Java API when you interested in high performance. Core Java API provides more than 10 times faster requests processing than Cypher query language.

    See this articles: