Closed rdustinb closed 9 years ago
Results of the initial profile with Cumulative Time being the target:
7568590 function calls (7149593 primitive calls) in 21.047 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
279/1 0.017 0.000 21.048 21.048 {built-in method exec}
1 0.889 0.889 21.048 21.048 SpaceWeather.py:11(<module>)
1 2.896 2.896 16.190 16.190 {built-in method exec_}
29 0.001 0.000 13.247 0.457 backend_qt5.py:327(resizeEvent)
29 0.000 0.000 13.144 0.453 backend_qt5agg.py:140(draw)
29 0.001 0.000 13.143 0.453 backend_agg.py:458(draw)
9268/29 0.043 0.000 13.120 0.452 artist.py:57(draw_wrapper)
29 0.004 0.000 13.119 0.452 figure.py:1004(draw)
29 0.003 0.000 13.020 0.449 _base.py:1989(draw)
58 0.006 0.000 11.498 0.198 axis.py:1106(draw)
3319 0.133 0.000 6.076 0.002 text.py:287(_get_layout)
58 0.007 0.000 5.974 0.103 axis.py:1054(_get_tick_bboxes)
1499 0.021 0.000 5.966 0.004 text.py:763(get_window_extent)
3709 0.040 0.000 5.764 0.002 backend_agg.py:208(get_text_width_height_descent)
286 0.005 0.000 5.138 0.018 mathtext.py:2964(parse)
3017/2874 0.012 0.000 4.042 0.001 pyparsing.py:1084(parseString)
130853/2860 0.624 0.000 4.020 0.001 pyparsing.py:1037(_parseCache)
125037/2874 0.633 0.000 3.976 0.001 pyparsing.py:957(_parseNoCache)
32216/2874 0.142 0.000 3.931 0.001 pyparsing.py:2358(parseImpl)
1499 0.027 0.000 3.554 0.002 axis.py:232(draw)
1 0.001 0.001 3.305 3.305 SpaceWeather.py:41(__init__)
9 0.001 0.000 3.196 0.355 MyMplCanvas.py:20(__init__)
5203 0.232 0.000 3.181 0.001 lines.py:661(draw)
6173/5601 0.019 0.000 3.001 0.001 pyparsing.py:2729(parseImpl)
7860/5889 0.020 0.000 2.865 0.000 pyparsing.py:2814(parseImpl)
143 0.003 0.000 2.782 0.019 mathtext.py:2323(parse)
43499/1007 0.213 0.000 2.714 0.003 pyparsing.py:2622(parseImpl)
9884/7770 0.026 0.000 2.708 0.000 pyparsing.py:776(wrapper)
6167/870 0.553 0.000 2.700 0.003 pyparsing.py:2478(parseImpl)
143 0.001 0.000 2.592 0.018 mathtext.py:2402(math_string)
916/145 0.004 0.000 2.569 0.018 pyparsing.py:2764(parseImpl)
Results of profile after architectural changes
7627775 function calls (7207510 primitive calls) in 19.091 seconds
Ordered by: cumulative time
ncalls tottime percall cumtime percall filename:lineno(function)
277/1 0.018 0.000 19.093 19.093 {built-in method exec}
1 0.852 0.852 19.093 19.093 SpaceWeather.py:11(<module>)
1 0.939 0.939 14.286 14.286 {built-in method exec_}
29 0.001 0.000 13.298 0.459 backend_qt5.py:327(resizeEvent)
29 0.000 0.000 13.199 0.455 backend_qt5agg.py:140(draw)
29 0.001 0.000 13.198 0.455 backend_agg.py:458(draw)
9292/29 0.042 0.000 13.173 0.454 artist.py:57(draw_wrapper)
29 0.004 0.000 13.173 0.454 figure.py:1004(draw)
29 0.003 0.000 13.075 0.451 _base.py:1989(draw)
58 0.006 0.000 11.471 0.198 axis.py:1106(draw)
3483 0.133 0.000 6.196 0.002 text.py:287(_get_layout)
58 0.007 0.000 6.092 0.105 axis.py:1054(_get_tick_bboxes)
1472 0.021 0.000 6.083 0.004 text.py:763(get_window_extent)
3830 0.041 0.000 5.787 0.002 backend_agg.py:208(get_text_width_height_descent)
284 0.005 0.000 5.141 0.018 mathtext.py:2964(parse)
2996/2854 0.011 0.000 4.059 0.001 pyparsing.py:1084(parseString)
129872/2840 0.664 0.000 4.038 0.001 pyparsing.py:1037(_parseCache)
124102/2854 0.725 0.000 3.995 0.001 pyparsing.py:957(_parseNoCache)
31980/2854 0.150 0.000 3.946 0.001 pyparsing.py:2358(parseImpl)
1472 0.026 0.000 3.453 0.002 axis.py:232(draw)
1 0.001 0.001 3.271 3.271 SpaceWeather.py:41(__init__)
5225 0.230 0.000 3.111 0.001 lines.py:661(draw)
1411/1203 0.041 0.000 3.030 0.003 axis.py:67(__init__)
6130/5562 0.018 0.000 2.969 0.001 pyparsing.py:2729(parseImpl)
7802/5848 0.025 0.000 2.837 0.000 pyparsing.py:2814(parseImpl)
142 0.002 0.000 2.742 0.019 mathtext.py:2323(parse)
43166/1000 0.313 0.000 2.676 0.003 pyparsing.py:2622(parseImpl)
9812/7716 0.026 0.000 2.672 0.000 pyparsing.py:776(wrapper)
6116/864 0.292 0.000 2.563 0.003 pyparsing.py:2478(parseImpl)
142 0.001 0.000 2.557 0.018 mathtext.py:2402(math_string)
908/144 0.003 0.000 2.535 0.018 pyparsing.py:2764(parseImpl)
This is preliminary work to then restructure the entire application with (hopefully) faster Python code. Currently there are many inefficiencies within (mostly) the NoaaApi.py file as well as others, that should be rehashed to be more Python-esque.