Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query optimisation: where should I look for? #253

Open
pirhoo opened this issue Jul 17, 2014 · 1 comment
Open

Query optimisation: where should I look for? #253

pirhoo opened this issue Jul 17, 2014 · 1 comment

Comments

@pirhoo
Copy link
Contributor

pirhoo commented Jul 17, 2014

Hi @mhluongo,

we encounter some slowness with Neo4django. According the access log I noticed that the ORM does a lot of requests to load the Model schema from Neo4j. I understand why we need to do that schema but don't you think we could cache this in any way? If yes, I'll be happy to give it a try but I don't know where should I look first.

Very best,
P

@mhluongo
Copy link
Member

@pirhoo sorry for the long silence on this. Honestly, I think the best way to speed up this stuff would be to focus more heavily on the scripting, and eschew the use of neo4j-rest-client's pure-REST for basic models- or at least introduce some discipline. For example, it takes a few calls to create a new node, instead of one- partly because we blindly rely on the underlying client, and don't think about what triggers an update.

Type nodes, etc are definitely a target for caching. Some happens already, but clearly not enough. A good place to start is https://github.com/scholrly/neo4django/blob/master/neo4django/db/models/base.py#L392. Though moving to Neo4j 2+ would let this be replaced by schemas instead of an in-graph type hierarchy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants