0

I am trying to profile a python script I have. I run it like this:

$ python -m cProfile -o out.profile script.py

It runs well, I get a file called out.profile with profiling information, but I see that the biggest influencer in execution time is this:

~:0(<method 'pop' of 'list' objects>)

With 77% of the execution time. Here is a chart I got with snakeviz.

snakeviz's output

So, my question is:

What part of the python API might be using 'pop' method of 'list' object? Because I am not calling pop explicitly anywhere in my script.

Update: This is the CALL STACK I have on that method:

enter image description here

Pablo Santa Cruz
  • 176,835
  • 32
  • 241
  • 292
  • Do you want people to guess? Presumably you can actually *see* what line 39 of `import_movements-inserts.py` is, and have more insight into what objects are being used there. – jonrsharpe Oct 28 '17 at 15:23
  • I don't want people to *guess*. I am not asking how to make my script run faster. I would like to know, if there is a way to know (using `cProfiler`) the source of all those calls to `pop` since there are no explicit calls to that method anywhere in my code. – Pablo Santa Cruz Oct 28 '17 at 15:30

0 Answers0