I have noticed that my program takes an unnecessary amount of CPU and ran a profiler in Visual Studio.
It showed that the poll function in rtcp runner is very CPU heavy, although it's not doing much. Long story short the wait time of ::select function was not fully implemented, and was always 0, causing the function to busyloop. I fixed it by finishing the wait time calculation for microseconds aswell. After this adjustment, the CPU load of my program was roughly halved.
Hello,
I have noticed that my program takes an unnecessary amount of CPU and ran a profiler in Visual Studio. It showed that the poll function in rtcp runner is very CPU heavy, although it's not doing much. Long story short the wait time of ::select function was not fully implemented, and was always 0, causing the function to busyloop. I fixed it by finishing the wait time calculation for microseconds aswell. After this adjustment, the CPU load of my program was roughly halved.