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

Projects
None yet
2 participants
@jonathanwin
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@jonathanwin

jonathanwin Nov 14, 2012

Contributor

see Pull Request #73

Contributor

jonathanwin commented Nov 14, 2012

see Pull Request #73

@craigtaverner

This comment has been minimized.

Show comment
Hide comment
@craigtaverner

craigtaverner Jan 16, 2013

Contributor

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

Contributor

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