Optimize kdtree.