speed up tree gen