I'm calling subscribe() in App.js of my React Native app and it's extremely slow to return parameters on both iOS and Android. Rarely it'll take a second or two, but most of the time it's 5+ seconds. It doesn't matter if I call subscribe() from componentDidMount or globally. Is there a way to speed this up? We're using branch links to go straight to a particular component depending on the object received from Branch.
React Native 0.55.2
react-native-branch 2.3.0
Subscribe method internally involves communication to Branch Server. One possibility is that if the internet connection speed drops low, then calls to Branch Server would take more time to complete. That could slow down the return of parameters.
Can you please check if you have the same speed issue (5+ seconds) while on another/faster network?
Hi. Thanks for your response. I apologize for taking so long to get back to you.
We've been testing a lot on LTE networks and WiFi. It is a bit faster on LTE. Since the subscribe() method doesn't return anything until the request resolves, is there some method that can fire immediately to know that the app was opened via a Branch Link so we can design our own UI to deal with the varying lag times?
+1 also wondering
+1
+1, is it possible?
is there some method that can fire immediately to know that the app was opened via a Branch Link so we can design our own UI to deal with the varying lag times?
@gazedash So I found a little hack... The listener of Linking of react-native also gets the url that triggers the app. If you don't want the extra params maybe you can try catching the url from linking.
@andreshsingh hmmm, I also tried it, but it didn't recieve anything. Can you share your code?
Maybe also you can share your openURL method from AppDelegate, I think it is related
Most helpful comment
Hi. Thanks for your response. I apologize for taking so long to get back to you.
We've been testing a lot on LTE networks and WiFi. It is a bit faster on LTE. Since the subscribe() method doesn't return anything until the request resolves, is there some method that can fire immediately to know that the app was opened via a Branch Link so we can design our own UI to deal with the varying lag times?