React-native-navigation: [iOS] mergeOptions is slow

Created on 3 Dec 2020  路  3Comments  路  Source: wix/react-native-navigation

馃悰 Issue Report

Hi !

mergeOptions on iOS is slower since version 6.10.1
I use it on a scroll to change the color of the status bar and the tabbor at a given scroll point, and the scrolling is jumpy on iOS.

Note that it's not the options that consume resource. If I do a simple Navigation.mergeOptions(componentId); the scrolling become also jumpy.

No problem on Android, it鈥檚 butter smooth, but on iOS the frame drop in the ui thread is even visible on an iphone 12 pro.

The change that seems to me to be the most resource-intensive is this one :

6.10.1 > 6.11
mergeOptions became slower because of this commit
https://github.com/wix/react-native-navigation/commit/c9e5309f87bdae31cd2d90a51ead201b297bbf94
Renaming objectProperties to classProperties
Reverting this commit greatly improves fluidity.

Demo on iPhone X (Release)

With this commit :
https://imgur.com/a/8DyQyjE

Without this commit :
https://imgur.com/a/hC3TqBk

Do think there is a way to improve that ?

Thank you ! 馃檹

Your Environment

  • React Native Navigation version: 7.5.0
  • React Native version: 0.63.3
  • Platform(s) (iOS, Android, or both?): iOS
  • Device info (Simulator/Device? OS version? Debug/Release?): Simulator & Device, Debug @ Release
iOS acceptebug

Most helpful comment

@danilobuerger we should be explicit here.. working on it asap

All 3 comments

I can't wait for the bridge to disappear. With a sync invocation (TurboModules) this would be much smoother.

Either way, that's a regression. I believe @yogevbd is pretty busy right now, I've assigned him but I'll take a look at this tomorrow and see if I can fix it.

@guyca I wonder why we are resorting to runtime introspection for mergeOptions anyway? Why not do it like on android and be explicit about what we are merging?

@danilobuerger we should be explicit here.. working on it asap

Was this page helpful?
0 / 5 - 0 ratings