tzaeschke / tinspin-indexes

Spatial index library with R*Tree, STR-Tree, Quadtree, CritBit, KD-Tree, CoverTree and PH-Tree
http://www.tinspin.org
Apache License 2.0
111 stars 24 forks source link

Package level of IndexConfig's counstructor doesn't allow to adjust performance #33

Closed LerinRuss closed 11 months ago

LerinRuss commented 11 months ago

Hi, I noticed yoy wrote that section in ReadMe.md under "performance" header. "For kD-trees, try disabling defensive copy via IndexConfig..." But there is no way to create IndexConfig externally as constructor has a package level of visability and there is no any factory method for creating it. Could you check it?

tzaeschke commented 11 months ago

Thanks for reporting! I'll have a look. I wouldn't expect too much performance improvement though, maybe a few percentage points. It may make a bigger difference if you are deleting a lot of entries or whole kd-trees because in that case it may avoid garbage collection.

tzaeschke commented 11 months ago

I added a method IndexConfig.create() in #34 .