First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
I ran the tool on a accc file I had lying around and here's the profile dump:
accc_report.profile% sort cumtime
accc_report.profile% stats 5
Mon Aug 05 14:07:37 2013 accc_report.profile
44061406 function calls (44061393 primitive calls) in 160.941 seconds
Ordered by: cumulative time
List reduced from 2713 to 5 due to restriction <5>
ncalls tottime percall cumtime percall filename:lineno(function)
1 64.068 64.068 161.037 161.037 accc_report.py:15(<module>)
5786418 47.012 0.000 47.012 0.000 {method 'index' of 'tuple' objects}
4802 2.327 0.000 25.199 0.005 .\pssarrays.py:1239(accc_solution)
1200 0.646 0.001 11.804 0.010 accc_report.py:544(GetN1results)
1 0.048 0.048 10.357 10.357 accc_report.py:517(BuildMasterConlist)
Things i noticed:
{method 'index' of 'tuple' objects}
at 47sec.pssarrays.accc_solution()
is quicker than I remembered at 25sec.I'm not sure what is hammering the {method 'index' of 'tuple' objects}
. A small refactor to break up some of the main loop into functions would give us some hints, or you could figure it out just by staring at the code for a while.