1

I'm trying to profile a script for Blender written in python. Problem is that majority of running time is spent in "built-in method call" which I rally don't know what is.

Could anybody tell me what this method does or give me some hint how to reduce its computational time?

Sample output of cProfile is:

71193 function calls (63983 primitive calls) in 9.305 seconds
...
816    6.427    0.008    6.427    0.008 {built-in method call}
...

Thanks.

arik
  • 109
  • 4

1 Answers1

2

Those are calls to native functions, which are written in C/C++. All calls to native functions apparently go through a call function in the python runtime.

To further profile using cProfile, you should try to avoid having to dig deeper into the call function. Modularize your Python code, so that it becomes apparent which part takes up most of the time, while ignoring the lines that point to the native code in the cProfile output.

The alternative is digging deeper into the native Blender source code, which is most likely something you want to avoid, and also not the best idea in your case.

pvoosten
  • 3,247
  • 27
  • 43