Open Jack-Byrne opened 3 years ago
https://github.com/smartdevicelink/sdl_core/pull/3941 improves the CPU usage but is only a partial fix. The CPU usage of the boost build for video streaming logs is still much higher than that of the log4cxx build.
Some other ways to improve CPU usage would be to:
BoostLogger::GetLocalPosixTime
is used for every PushLog to convert the timestamp into a format the boost logger can use (boost::posix_time::ptime
).add_attribute
method. I believe this is main cause of the higher CPU usage. Unfortunately, I wasn't able to find an alternative in the documentation which would work with the boostconfig.ini
file
Bug Report
When comparing the default log4cxx build of SDL Core with the Boost logger configured build, the Boost build of SDL Core uses a lot more CPU during video streaming.
Reproduction Steps
Expected Behavior
Boost logger build of SDL Core uses a comparable amount of CPU as the LOG4CXX build.
Observed Behavior
Boost build of SDL Core uses over 100% of system CPU when video streaming.
OS & Version Information