Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Would self-hosting be faster than free tier Aura, or how do I optimize 10second Neo4j bottlenecks?


Hi, why is Neo4j running so slow for me?  I have essentially nothing in the database, and saving / loading a graph through a Django app (server side) and onto client (essentially just JS/HTML) which is a very short JSON string, takes on average 10 seconds just estimating.  Could  be less.  

So the bottleneck is obviously transactions with the Neo4j database.  Is there a "super optimized version/configuration" that would work in my use case?

My use case is graph relating abstract math data.  Morphisms (category theory) are represented in Neomodel using StructuredRels.  Objects are obviously notes.  Now that won't work for all my use case because sometime's there's going to be in the client side an arrow that seems to be connecting two arrows (e.g. a natural transformation).  Usually the objects of a two different diagrams are not connected by morphisms.  So if we don't consider all the other mathy relationships such as "Diagram -{LIVES_IN}-> Category", then the total graph database would appear to be a disconnected collection of relativiely small graphs <50 nodes each.  And only so many arrows as to be humanly elegant looking or easy enough to visually parse.



It's tough to give a general answer here about why something is fast or slow.  Can you give us an example of what kind of code you're running, and how long that takes, and what you expect and/or what you've compared it to?  This would help diagnose what's going on.

Aura is running the same Neo4j as you'd run for yourself, so it's worth checking what's different about your Aura environment; is it created in a region close to you?  How does your code work?