An essential part of ray-tracing rendering is the creation of an optimal KD-Tree.
It requires learning where are your objects, their boundaries (min/max) in X, Y and Z axes.
Which objects have significant number of vertices and polygons (sort by vertex count?)
Histogram? https://www.google.com/search?q="histogram"+3d+kd-tree
Note that changing surface settings, camera position, light position does not require KD-Tree/Octree recreation.
Just modification of mesh (bones, deformations, key-frames).