Posted By: Superku
draw_text/ draw_obj slow...? - 07/02/18 13:30
At the AckCon I was running a test of a multiplayer game on various machines. On many machines the FPS was all over the place, in particular not consistent at all (as in let's say jumping between 30 and 90 FPS or equivalent ms of processing every few frames).
I've narrowed down the performance bottlenecks using dtimer(). Turns out, drawing text on screen (for example for names or live rankings) consumes way more performance than all other things in the game combined.
Example test project:
My desktop PC runs on an i7-6700K. It takes around 2.7ms on average to draw 30 strings, with spikes of 10+ms every few seconds.
On my weaker (i7 still) laptop I have an average execution time of 5ms but highly fluctuating betwen 4.9ms and 10ms, with spikes of 13+ms.
Why it is that slow and why are there huge differences in execution time (including but not limited to the spikes), instead of being about the same every frame?
Can this be fixed/ improved?
I've narrowed down the performance bottlenecks using dtimer(). Turns out, drawing text on screen (for example for names or live rankings) consumes way more performance than all other things in the game combined.
Example test project:
Click to reveal..
My desktop PC runs on an i7-6700K. It takes around 2.7ms on average to draw 30 strings, with spikes of 10+ms every few seconds.
On my weaker (i7 still) laptop I have an average execution time of 5ms but highly fluctuating betwen 4.9ms and 10ms, with spikes of 13+ms.
Why it is that slow and why are there huge differences in execution time (including but not limited to the spikes), instead of being about the same every frame?
Can this be fixed/ improved?