2011/3/15 Craig Taverner <cr...@amanzi.com> > > > > > One question before I dive into this... Do the Traversal framework > > > involve performance improvements over the core API as shown in your > > > example? > > > > It doesn't currently, since it's using the core API. But I think the goal > > is > > to have it "drop down" one level in order to gain performance. > > > One would expect that since the traversal framework needs to keep caches of > paths already traversed, so as not to repeat itself or get into infinite > loops, it must, almost by definition, perform worse than the core API. I > assume that the difference is not great. However, if it is possible to make > the traverser perform better than the core API, I would assume that means > the core API could be optimized also. Theoretically the core API should > always be faster? >
Not necessarily. The core API must always return well behaving Node/Relationship "proxies" which always must do the right thing in regards to locking and each called checks with the NodeManager before doing anyhing. If the traverser could drop down one level (to NodeImpl/RelationshipImpl) and stay there throughout the entire traversal and pop backup again only when returning results it would gain memory/performance that you couldn't gain by doing a manual traversal using the core API. Then there's the overhead that comes with traversal state and all that, but I think for not-super-small traversals there could be a gain using traversals if they could "drop down". > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user