3 ms·
My team achieved better than native performance using RN when rewriting a very large iOS app. And that was in 2018, before Hermes and a lot of other optimizatio
by ricardobeat 2y ago
My team achieved better than native performance using RN when rewriting a very large iOS app. And that was in 2018, before Hermes and a lot of other optimizations.
It takes some careful usage of requestIdleCallback and avoiding doing work in the UI thread but it is not rocket science. You do have to avoid a lot of the going advice and bloated libraries / frameworks though.
- mradonic 2y ago| better than native performance Maybe better than the native you had before the rewrite lol
- ricardobeat 2y ago“The app we had before” had 50M+ users, developed by a large iOS team, including a lot of experienced developers working on performance, and generating billions. I think it was a valid baseline.
- robterrell 2y ago> better than native performance using RN You had an app written natively in Objective-C or Swift, switched to single-threaded javascript React Native, and then your app ran faster?
- wiseowise 2y agoUnoptimized native application, probably written in a yolo let’s ship it faster way, is slower than rewrite that learned from mistakes of previous application. What makes you surprised?
- ricardobeat 2y agoThough JS is single-threaded, it only builds the render tree and is more than fast enough if you’re careful. RN has a separate UI thread for actual rendering, I/O is offloaded and extensions can use extra threads. The largest bottleneck historically was the bridge between obj-c and js (now superseded by JSI), and not the speed of the engine itself.