2

I'm running cProfile to benchmark my Django application. The relevant lines look like this:

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
    3    0.027    0.009    0.027    0.009 {built-in method load}
  149    0.004    0.000    0.007    0.000 /usr/lib/python2.7/site-packages/django/db/models/base.py:275(__init__)
  149    0.004    0.000    0.005    0.000 /usr/lib/python2.7/site-packages/django/db/backends/mysql/compiler.py:4(resolve_columns)
  349/72    0.002    0.000    0.007    0.000 /usr/lib/python2.7/copy.py:145(deepcopy)

What is {built-in method load}? It is dominating my execution.

ldinh
  • 113
  • 1
  • 5
  • 3
    It's some builtin function called `load`. Use the profiler's ability to print callers to see what is calling it, that should help you figure out what it is. One possibility that comes to mind is [`pickle.load`](http://docs.python.org/2/library/pickle.html#pickle.load). – BrenBarn Sep 11 '13 at 19:40
  • 1
    It may be dominating execution, but at 27ms it still looks incredibly pointless to try to optimize it... – Armin Rigo Sep 11 '13 at 21:12

0 Answers0