cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

PauseTransmission taking lot of CPU time

Open nishchith-cp opened this issue 2 years ago • 3 comments

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 MicrosoftTeams-image (3)

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 avatar Sep 01 '22 08:09 nishchith-cp

@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.

lalitb avatar Sep 01 '22 20:09 lalitb

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.

nishchith-cp avatar Sep 02 '22 07:09 nishchith-cp

Thanks, have tagged this as help wanted, for consistent reproduction of the issue, to allow debugging it further.

lalitb avatar Oct 06 '22 17:10 lalitb