Optimisation
AlphaBril opened this issue · 1 comments
Just installed, and loving it ! Seriously it rocks good job.
However in VB I got a high cpu usage (40-50%), got to try an install on my laptop to see if it's better. Though a little about it, and wanted to ask if you ever thought to replace in main.c
SDL_Delay(1000 / cfg.targetFPS);
by SDL_WaitEvent
to reduce gpu use when we don't use our mouse (knowing that we implement your solution on rice, with a lot of control keys, we don't use the mouse this much).
Also a friend of mine pointed out that the overuse of call on root window may not be for the best. Don't know the options on this, but if we can make use of the GPU, this should optimise and decrement cpu usage again.
Going to fork this and try to implement it later on with a PR, let me now if that sounds right, or if you already inspected those options and they are pointless.
Sorry for late resposnse, I didn't have much time lately.
It sounds good, this could improve performance. You can create a PR.