ProFi is noticeably improving game performance
Posted: Wed Jan 15, 2020 10:27 pm
As sprites are added to the screen, as expected my game gets progressively slower, so I used ProFi, to find out what my bottleneck was.
https://gist.github.com/perky/2838755
As it turns out, the collision detection checks between my game objects are taking up the most time, while drawing the sprites, takes the next most at about 1/4 of the time as the collision detection.
The strange thing is that using ProFi has significantly sped up the execution of my code.
Using love.timer.getTime() values for comparison, the update and draw functions are taking up something like four times less time to run when ProFi is active. If I comment out ProFi:start(), the game goes right back to running slowly.
Does anyone have an idea about why ProFi is improving performance?
https://gist.github.com/perky/2838755
As it turns out, the collision detection checks between my game objects are taking up the most time, while drawing the sprites, takes the next most at about 1/4 of the time as the collision detection.
The strange thing is that using ProFi has significantly sped up the execution of my code.
Using love.timer.getTime() values for comparison, the update and draw functions are taking up something like four times less time to run when ProFi is active. If I comment out ProFi:start(), the game goes right back to running slowly.
Does anyone have an idea about why ProFi is improving performance?