[v4] Performance issues #642
Replies: 4 comments
-
Just as a note: I can confirm that on a plain expo-router project in a production build on an iPhone. (without any of the other styling libraries) |
Beta Was this translation helpful? Give feedback.
-
For the initial release of v4 this is to be expected. I'm the only maintainer and I do not have enough time to work on both new features and performance. Post-release you expect performance improvements aiming to return to v2 performance speeds. I also don't like that benchmark. Its a very narrow-focused micro-benchmark. I'd like to see a benchmark with things like interactivity / screen transitions / etc. I'm going to convert this to a discussion as there's no end to this issue. It will always be an ongoing topic |
Beta Was this translation helpful? Give feedback.
-
The biggest bottleneck in performance is due to a bug in Reported: software-mansion/react-native-reanimated#5296 Due to this bug, inline animated styles needs to be wrapped in Using the supplied benchmark, removing these lines reduces the render time to just slower than GlueStack. I'm welcome to ideas on how to fix this, but I'd like something that works for all edge cases (e.g dynamically adding & removing animations, animations working through fast-refresh). Also, the solution isn't as easy as simply "can't you use the So, if fast-refresh is the issue - just do it in production? I don't know if crashing in production is a good solution. That's why the current solution is "everything is animated" - at least until |
Beta Was this translation helpful? Give feedback.
-
Now, this PR has already been merged: software-mansion/react-native-reanimated#5268. @marklawlor, has it been improved as per your suggestion? |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
Running a performance test of the latest versions of some popular UI frameworks it seems like NativeWind V4 has some performance issues. The benchmark renders 1000 styled View components and NW4 is 400% slower than Stylesheet
To Reproduce
Steps to reproduce the behavior:
Checkout the benchmark and run it
Screenshots
Bare React Native
NW4
Beta Was this translation helpful? Give feedback.
All reactions