mourner / rbush

RBush — a high-performance JavaScript R-tree-based 2D spatial index for points and rectangles
MIT License
2.46k stars 237 forks source link

Balancing? #136

Closed ccorcos closed 10 months ago

ccorcos commented 10 months ago

Hey there, I'm curious about this implementation -- it seems like isn't any balancing going on when inserting items. Is that on purpose?

Thanks,

Chet

mourner commented 10 months ago

There is a certain degree of balancing through the split routine on insertion, but without reinsertion on overflow, which was heavily detrimental to performance due JS specifics. https://github.com/mourner/rbush#algorithms-used