peoplemap
peoplemap copied to clipboard
Performance Testing
I would be very interesting to know why the peoplemap is so slow. Is it my neo4j.rb that is slow ? Or maybe just need to add some rails caching ?
...not sure - I've just been focussed on trying to get the basic concept clear in my head - there are a lot of traversals happening on the show page - a query to generate graphml, 5 to bring back relationships with nodes of specific types, and 5 node searches to list remaining nodes... there's definitely some work that can be done there. Also, I suspect my code is very slow in the way it works with neo4j, so that could use some attention too. Let me know if you've got any suggestions to improve things!
Here is one performance suggestion: Neo4j::NodeMixin#all.nodes methods does not retrieve any nodes (its retrieved when you call the each method). If you do this several time, it might be better to create an array first, e.g. Person.all.nodes.to_a