Skip to content

Commit

Permalink
Merge pull request #40 from fumin/master
Browse files Browse the repository at this point in the history
improve search performance by reduce overlapping
  • Loading branch information
dhconnelly authored Aug 13, 2022
2 parents 88e5102 + 03537ce commit f011ecf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rtree.go
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,8 @@ func (tree *Rtree) condenseTree(n *node) {
n = n.parent
}

for _, n := range deleted {
for i := len(deleted) - 1; i >= 0; i-- {
n := deleted[i]
// reinsert entry so that it will remain at the same level as before
e := entry{n.computeBoundingBox(), n, nil}
tree.insert(e, n.level+1)
Expand Down

0 comments on commit f011ecf

Please sign in to comment.