-2

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.

Juan Carlos
  • 179
  • 2
  • 9

1 Answers1

3

the easiest way might be to check the times:

import time

start = time.time() print("your time consuming task") end = time.time() print(end - start)

Chris
  • 59,454
  • 6
  • 30
  • 84