I have a quite complex blender script and I would like to know if there is a way/tool to benchmark my script to find a possible bottleneck? I have noticed that in some situations with many objects in different hierarchies my script takes around 2 to 3 min to finish the task and I would like to know where the bottleneck is.
On early test it seems like selecting and deleting a lot of empty objects takes time, but since this is just a perception I would like to know if I can track the time taken in specific parts of the code to know where the real bottleneck is.
cProfile? – HikariTW May 17 '21 at 06:56