retrieving coordinates, k-d trees and octrees

Looking for the optimal way to retrieve the “x”, “y”, “z” coordinates of a 3D model using vtk.js whenever I click on it. Already kind of did the thing using vtkCellPicker, but it takes like half a second or a little bit more to print the coordinates to the console.

I am now looking to implement the same thing, but that takes less time to retrieve those same coordinates through a click event.

I thought about kd-tree’s or even octree’s, has someone had experience implementing something similar? Are there any other options I can try more than kd-tree to optimize the execution time? I am new to vtk.js, thanks in advance for your help.