cpp_client_telemetry
cpp_client_telemetry copied to clipboard
PauseTransmission taking lot of CPU time
Describe your environment. Describe any aspect of your environment relevant to the problem, including your SDK version, platform, OS version, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main brach. SDK - 'OneDsCppSdk.iOS', '3.6.187' iOS
We observed that the pause transmission is taking a lot of CPU time sometimes.
PFA
Steps to reproduce. Describe exactly how to reproduce the error. Include a code sample if applicable. We call the pause transmission on joining a call or loading the chat screen.
What is the expected behavior? What did you expect to see? CPU usage should be minimal
What is the actual behavior? What did you see instead? CPU usage is around 97% for a longer times as seen in the screenshot
Additional context. Add any other context about the problem here.
@nishchith-cp - The stack trace is not sufficient to find the reason. Do you have more details here - Is it consistently happening in PauseTransmission
, and reproducible? How many events were transmitted before trying to pause the transmission? PauseTransmission will try to cancel all the events waiting to be uploaded in the queue, and if there are lots of such events the CPU usage will increase.
It is not reproducible always. I even tried looping around 100 events and calling the pause transmission but could not see the issue. But people have been observing this issue where pause transmission takes longer and most of the CPU time.
Thanks, have tagged this as help wanted, for consistent reproduction of the issue, to allow debugging it further.