It appears that website interactions in the WebView component is less performant than opening a website in iOS Safari. FWIW, the website I analyzed this is a React Web app.
I made a video recording. The first 15 seconds or so is my website in Safari. In the second half, I navigate my website in a WebView (built in release mode) and running on an iPhone 5s.
I enabled accessibility options so you can see taps in the recording. When comparing the delta between Safari and React Native, notice the amount of time between when a navigation button is clicked and it's icon and text are shown in the active state.
To make the comparison easier, I made some GIF's.
| React Native WebView | iOS Safari |
| ------------------------------------------------- |:-------------------------------------------------:|
|
|
|
I'm not certain to the origin of this issue, so unfortunately I can't propose PR to amend the problem.
I made a rnplay example app, but I don't believe it sufficiently demonstrates the issue due to the image compression and probable decreased frame rate. It's a very simple app, though.
@sunnylqm Thanks for pointing me in the right direction. I was reading through #321 and came across this particular comment that basically says WKWebView is incomplete. I'm curious if those concerns can still be substantiated now since that comment was from 2015. This PR from October 2016 seems to suggest WKWebView isn't still at full feature parity. I'll give it a go anyways, since I'd want the perf boost. Looks like there is already a community solution for using WKWebView in RN: https://github.com/CRAlpha/react-native-wkwebview
Down the line, it would be fantastic to see RN opt for the more performant of the two, but if there are limitations, I could see why RN uses UIWebView.
Alright, I have been able to achieve an acceptable solution using WKWebView. Since the performance issues are a known limitation UIWebView, closing this.
Most helpful comment
You can try WKWebView
https://www.quora.com/Why-is-the-quality-of-UIWebView-less-than-Safari