Performance Enhancement: Migrate to Modern React Native Architecture ๐
Hi,
This PR introduces changes to modernize the React Native architecture, yielding significant improvements in native performance and enabling bridgeless mode compatibility (see https://reactnative.dev/architecture/landing-page#fast-javascriptnative-interfacing for more information). Migrating to these updated packages ensures long-term support, alignment with modern React Native standards, and enhanced performance for future project development.
Package Updates:
-
react-native-fs->@dr.pogodin/react-native-fs: This migration replaces the original package with a version that supports the new React Native architecture and is actively maintained. Refer to the project history and roadmap here: https://github.com/birdofpreyru/react-native-fs?tab=readme-ov-file#project-history--roadmap. An additional benefit is improved tree shaking capabilities. -
@react-native-async-storage/async-storage->react-native-mmkv: This change leverages the new React Native architecture through Turbo Modules, resulting in substantial performance gains.react-native-mmkvis approximately 25x faster than@react-native-async-storage/async-storage. Benchmark details can be found here: https://github.com/mrousavy/react-native-mmkv?tab=readme-ov-file#benchmark. -
Expo Packages: All Expo-related packages have been updated to their latest versions. Importantly,
expo-camerahas been migrated from the legacy (deprecated) version to the new version (expo-camera-next). This new version uses an improved camera API under the hood. See more details here: https://expo.dev/blog/expo-camera-next#our-goals-for-expo-cameranext.
Release Strategy Suggestion:
As for the release, I suggest we can either release this update with a @beta tag to allow users to test the changes before the final release or we can update all relevant documentation and introduce this as a breaking change for the next major version. This will give us the flexibility to properly communicate the changes and ensure a smooth upgrade path for the users.
Please review these changes and let me know if you identify any issues or potential areas for improvement. Your feedback is greatly appreciated.
Issue -: https://github.com/tensorflow/tfjs/issues/8292
Amazing thanks!
Exactly what I was looking for, thank you ๐
I hope this gets merged soon!! Great work โค๏ธ
Exactly what I was looking for, thank you ๐
I hope this gets merged soon!! Great work โค๏ธ
Thanks so much for the kind words! I'm hopeful for a merge soon too ๐ซ
@mattsoulanille @Linchenn sorry to bother you, but I saw you reviewed previous changes of the RN support (https://github.com/tensorflow/tfjs/pull/7451): any chance you can take a look at this one? ๐
Thanks in advance! ๐
Hey guys! this is amazing!! I'm having this issue for a while, any update on this?
@mattsoulanille @Linchenn sorry to bother you, but I saw you reviewed previous changes of the RN support (https://github.com/tensorflow/tfjs/pull/7451): any chance you can take a look at this one? ๐
Thanks in advance! ๐
Hello,
I received an update yesterday regarding PR:
Reference: https://discuss.ai.google.dev/t/proposed-rewrite-of-react-native-integration-for-tensorflow-js/63295/5?u=sanjaiyan_parthipan
Hello,
I received an update yesterday regarding the PR:
Reference:ย https://discuss.ai.google.dev/t/proposed-rewrite-of-react-native-integration-for-tensorflow-js/63295/5?u=sanjaiyan_parthipan
Hi, do you have any updates on this PR ?
@mattsoulanille @Linchenn could you take a look at this PR please? ๐
Any update on this?
@mattsoulanille @Linchenn please please please, take a look at this PR ๐ฅน
@mattsoulanille @Linchenn please please please, take a look at this PR ๐ฅน
Is this project still being maintained, or is it considered stale?
@sanjaiyan-dev I don't think it's stale since I see @mattsoulanille merging and submitting PRs. I also see @pyu10055 approving a recent one.
I understand reviewing PRs from external contributors is hard, but it'd be nice to get a bit of feedback. I wonder if splitting this PR in smaller ones would help to digest them and get them mergedโฆ
@sanjaiyan-dev I don't think it's stale since I see @mattsoulanille merging and submitting PRs. I also see @pyu10055 approving a recent one.
I understand reviewing PRs from external contributors is hard, but it'd be nice to get a bit of feedback. I wonder if splitting this PR in smaller ones would help to digest them and get them mergedโฆ
Thank you so much for the helpful feedback and the great suggestion! I'm happy to split this into smaller PRs. Since I'm new to this process, could you offer any guidance on what the most logical chunks would be?
Sorry @sanjaiyan-dev I would need some time to examine the changes very thoroughly first. I'm not even sure if it's possible (I was hoping you could tell me ๐ ).
IMHO the smaller the PR the better, even if that means having many PRs.