rxi / lite

A lightweight text editor written in Lua
MIT License
7.33k stars 348 forks source link

Reduce idle cpu usage #285

Open 0xd61 opened 2 years ago

0xd61 commented 2 years ago

This pull request reduces the high idle CPU utilization (at least on Linux) discussed in #73. I have not tested this on windows. SDL_WaitEvent uses more CPU than simply polling events on each frame tick. With 60fps the CPU utilization is now 0.7 - 1%. Before it was 4%.