I develop an application that displays a MotionJPEG stream.
It was working great until I had a bug on iOS that froze the app when the connexion is lost (code stuck at Stream.ReadAsync and never returns).
So I changed all my streaming code from the old WebRequest - HttpWebRequest - GetRequestStream to the new and recommanded native HttpClient - SendAsync - ReadAsStreamAsync (using AndroidClient and NSUrlSession).
With that change the bug was fixed : great !
But since the streaming is very, very slow...
After some digging, I found that in release on Android it is still ok, but in Debug mode on Android AND on iOS (Debug and Release), it is very very slow.
It looks like the code is running fast (as usual), but the app has too few to read from the stream (like a bad slow internet connexion).
I've tried several things without success...
Do you have any ideas please ?