2

The UI of my react native app drops regularly but only on iOS. I attached a screenshot which shows the UI fps of about 11. Also it's a very steady wave and keeps happening several times. This leads to a annoying lags like for example during transitions, animations or during countdowns like on the screen attached. Any experiences with similar problems or ideas how to solve it or what's the reason for this?

Also important to mention, that it both happens on iOS simulator and real devices. Android doesn't have these problems.

enter image description here

makle
  • 1,237
  • 1
  • 15
  • 21

2 Answers2

2

Did you by any chance left some console.log in the AppDelegate files? I had a similar problem and mine was that the console was logging like crazy. Check your device log.

sebastianf182
  • 9,844
  • 3
  • 34
  • 66
  • I mean I have a ton of print statement also in our SDK code. But that shouldn't be an issue should it? Also in release mode they aren't executed are they? – makle Jan 04 '18 at 21:25
  • I would take a look into the logs as you use the app. My log stopped for some seconds and then continue and logged a massive amount of data. I was logging the font families and for some reason that slowed everything down. – sebastianf182 Jan 04 '18 at 21:34
1

Running in development mode is actually a major performance issue. Maybe trying to turn that off will help:
https://facebook.github.io/react-native/docs/performance.html

Also, try to interpolate as much of the animations as you can:
https://facebook.github.io/react-native/docs/animated.html#interpolation

Other than that, most companies who use react-native actually do the animations in native code and bridge responses to do the animation itself:
https://www.youtube.com/watch?v=rwQ6yxddKz4

ReyHaynes
  • 2,932
  • 1
  • 15
  • 22
  • Thanks for the response, I already tried the debug / release (development mode) thing which didn't help. I'll give the other ones a try! – makle Jan 04 '18 at 00:39