SPauly / ViscoCorrect

Tool for calculating correction factors based on viscosity in centrifugal pumps
GNU General Public License v3.0
2 stars 0 forks source link

Optimize main loop #31

Open SPauly opened 1 year ago

SPauly commented 1 year ago

The main loop of ViscoCorrect does not implement any update rate or frame limiting resulting in unnecessary CPU usage.

SPauly commented 1 year ago

With #38 the performance of the main loop did slightly improve but at the cost of animations as mentioned in #35. The main loop needs some heavy optimization and it might be applicable to implement multithreading. The frontend loop can then run on its own thread (it would of course need proper optimization in the case of ImGui at least), and the event queue can be handled on demand. This will also be beneficial to future feature implementations.