peoplemap icon indicating copy to clipboard operation
peoplemap copied to clipboard

Performance Testing

Open andreasronge opened this issue 15 years ago • 2 comments

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 ?

andreasronge avatar Oct 15 '09 13:10 andreasronge

...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!

sashaagafonoff avatar Oct 15 '09 13:10 sashaagafonoff

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

andreasronge avatar Oct 17 '09 11:10 andreasronge