Skip to content
Snippets Groups Projects
Commit f04f0859 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

make removing atoms fast again

Removing atoms from huge structures was observed to be super slow.
Reason was the removal from the spatial organizer which helps to find atoms
based on spatial proximity. The organizer is organized in buckets which
occupy a certain volume in space. Removing an element meant to iterate over
all buckets and all their items until the atom is found. However, we know
the position of the atom and thus can pinpoint the bucket in which its
expected to be. The SpatialOrganizer::Remove was therefore overloaded with
a version that accepts a position as hint in which bucket to look.
If the atom is there, delete and return. If not, call Remove without position
hint.
parent aaec9ede
No related branches found
Tags 2.3.1-rc
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment