0

I am facing a weird issue with my Android apk build. I have an app which has livestreaming feature. The livestreaming feature is by a third party sdk.

The issue is that, it works silky smooth in the debug build but the moment I try signed release build, it is lagging. The app works absolutely fine but the live streaming part gets laggy. Once streaming starts, the app also won't respond properly.

How can exactly the same code on debug and release build make this difference?

I have added compileOptions.encoding = 'gbk' as an additional config on build.gradle.

halfer
  • 19,824
  • 17
  • 99
  • 186
Varun A M
  • 1,103
  • 2
  • 14
  • 29
  • (I've just noticed that much of the original question here was removed, to the degree that the new version would be even more unanswerable. I've rolled it back to the more detailed version, given that there was no stated reason to excise that detail). – halfer May 25 '23 at 16:57

1 Answers1

0

This is kinda weird. After weeks of debugging, I found that the issue was in a while loop inside a thread!

There is a thread started on the launch of the fragment and the thread has a while loop which keeps on checking the value of a variable. Adding sleep(1000) inside the while loop solved this issue.

I am not sure how this was not observed in debug build.

halfer
  • 19,824
  • 17
  • 99
  • 186
Varun A M
  • 1,103
  • 2
  • 14
  • 29