nickna / Neighborly

An open-source vector database
MIT License
9 stars 2 forks source link

Optimize k-d Tree Rebuilding #1

Closed nickna closed 3 weeks ago

nickna commented 1 month ago

Currently, the KDTree is rebuilt every time a search is performed. We should update the KDTree incrementally when vectors are added or removed. Alternatively, it could be rebuilt less frequently based on a counter or simple heuristic.

nickna commented 3 weeks ago

k-d tree and Ball tree nodes are rebuilt in a background thread, five seconds after the last VectorList changes were made. This was introduced in #43