Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Use GridIndex instead of boost rtree for symbol placement. #8915

Closed

Description

@mb12

Platform:
All
Mapbox SDK version:
Master

Steps to trigger behavior

GL Native is still using rtree for symbol placement. We should switch to GridIndex instead of rtree since its much faster spatial index than rtree. GL JS uses GridIndex for symbol placement.

for (auto it = tree.qbegin(bgi::intersects(getTreeBox(anchor, box))); it != tree.qend(); ++it) {

Expected behavior

All references to boost rtree should be removed.

Actual behavior

rtree is still being used in performance critical symbol placement code.

Activity

  1. added
    performanceSpeed, stability, CPU usage, memory usage, or power usage
    on May 8, 2017
  2. added
    CoreThe cross-platform C++ core, aka mbgl
    on May 9, 2017
  3. jfirebaugh commented on May 11, 2017

    @jfirebaugh
    Contributor

    For reference, here's the gl-js commit making the switch (detailed rationale in the commit comment): mapbox/mapbox-gl-js@b62895a

  4. self-assigned this
    on Oct 20, 2017
  5. ChrisLoer commented on Oct 20, 2017

    @ChrisLoer
    Contributor

    #10103 currently uses rtree for the new collision detection work, but the speed of the index will become even more performance critical, so we will probably end up looking more closely at whether rtree still makes sense.

    /cc @ansis

  6. ChrisLoer commented on Nov 16, 2017

    @ChrisLoer
    Contributor

    PR #10436 (merging soon) switches from rtree to GridIndex. We never actually profiled rtree vs GridIndex in isolation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CoreThe cross-platform C++ core, aka mbglperformanceSpeed, stability, CPU usage, memory usage, or power usage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions