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

LayerNodeIndex.add( Node geometry, String key, Object value ) time is linear with index size #72

Closed
jonathanwin opened this issue Nov 14, 2012 · 2 comments

Comments

@jonathanwin
Copy link
Contributor

@jonathanwin jonathanwin commented Nov 14, 2012

Adding the node to the index fist checks whether it is present, by iterating over the full linked-list of all entries in the index via LayerNodeIndex.findExistingNode( Node geometry )
This takes linear time relative to the index size, causing terrible performance.

Adding the entry to the linked list then also iterates over the list to perform an append()

The index should probably not use a linked-list at for node-id presence checking as it is un-scaleable.

see https://groups.google.com/forum/#!topic/neo4j/qgGI60taSmA "neo4j-spatial LayerNodeIndex add() perfomance"

jonathanwin added a commit to jonathanwin/neo4j-spatial that referenced this issue Nov 14, 2012
jonathanwin added a commit to jonathanwin/neo4j-spatial that referenced this issue Nov 14, 2012
@jonathanwin
Copy link
Contributor Author

@jonathanwin jonathanwin commented Nov 14, 2012

see Pull Request #73

@craigtaverner
Copy link
Contributor

@craigtaverner craigtaverner commented Jan 16, 2013

Merged in Axels fixes, and did a number of cleanups on the use of the geometry chain (GEOM_NEXT relationships).

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

Successfully merging a pull request may close this issue.

None yet
2 participants