Skip to content

Faster rtree - #2385

Merged
TheMarex merged 13 commits into
masterfrom
faster-rtree
May 7, 2016
Merged

TheMarex merged 13 commits into
masterfrom
faster-rtree

Conversation

@TheMarex

@TheMarex TheMarex commented May 7, 2016

Copy link
Copy Markdown
Member

Breaks out the functional changes from #2347 to upstream them. This PR makes the StaticRTree factor 3 faster and in the process fixes some long standing issues:

  • StaticRTree now uses mmap, that mean no explicit file reading
  • StaticRTree now is const
  • StaticRTree does not need to be thread-local. Hence its updated with every other dataset on data update
  • StaticRTree is x3 faster thanks to less unnecessary copies and approximate projection by @oxidase

This PR breaks the data format for osrm-extract because the leaf size changes and is now page aligned.

@emiltin

emiltin commented May 7, 2016

Copy link
Copy Markdown
Contributor

great speed up!

TheMarex and others added 13 commits May 7, 2016 23:52
candidate_cache is removed because of failing test
make util-tests && ./unit_tests/util-tests --run_test=*/construct_multiple_levels_test
first bad commit: [9692be6] Add cache for CandidateSegments to reduce heap worke even more

Now SegmentIndex contains leaf index, object index and fixed_projected_coordinate
Changes:
* LeafNode is aligned to LEAF_PAGE_SIZE.
  Alignment brings 24 bytes memory overhead for 4096, but reduces
  cache misses rate.
* Unused m_element_count from leaf nodes file.
  The size is computed as m_leaves_region.size() / LEAF_PAGE_SIZE.
* Added try/catch for mmap exceptions messages.
@TheMarex
TheMarex merged commit 7316c48 into master May 7, 2016
@TheMarex
TheMarex deleted the faster-rtree branch May 7, 2016 21:53
@TheMarex TheMarex mentioned this pull request May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants