Rendering needs to know self.treedepth, so this must be in child processes and not just computed in do_preprocessing()