Original Post
Hi all,
i'm writing a short platformer game with python and pygame. Unfortunately, the whole thing is not really fast:/ So my idea was to profile the programm in order to find the problem.
At first i have some questions about it(never used "profiling" before):
is it right, that the results get better the longer I'm playing? Because all the stuff that is only done once on startup becomes less important over the time, and the average value gets more precise the longer everything runs.
Or have i a general error in reasoning?
What is the normal workflow in profiling a script that does not only runs from "top to bottom"?
Here is my first try with the "profile"-module and Gprof2Dot (http://code.google.com/p/jrfonseca/wiki/Gprof2Dot]gprof2dot): (ca. 10 seconds playingtime)
Link to profiling graph= http://imgur.com/wPZZA.png
My conclusion is that the most of the time is spend during the rendering process, especially with the "renderMapLayer"-Method,
greetings
Simon
Ps: Sorry for my bad english. I hope it's understandable..
i'm writing a short platformer game with python and pygame. Unfortunately, the whole thing is not really fast:/ So my idea was to profile the programm in order to find the problem.
At first i have some questions about it(never used "profiling" before):
is it right, that the results get better the longer I'm playing? Because all the stuff that is only done once on startup becomes less important over the time, and the average value gets more precise the longer everything runs.
Or have i a general error in reasoning?
What is the normal workflow in profiling a script that does not only runs from "top to bottom"?
Here is my first try with the "profile"-module and Gprof2Dot (http://code.google.com/p/jrfonseca/wiki/Gprof2Dot]gprof2dot): (ca. 10 seconds playingtime)
Link to profiling graph= http://imgur.com/wPZZA.png
My conclusion is that the most of the time is spend during the rendering process, especially with the "renderMapLayer"-Method,
greetings
Simon
Ps: Sorry for my bad english. I hope it's understandable..