You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android, when translating off-screen components onto the screen, it takes a very long time. When the function to bring them on-screen is triggered, it seems to completely block the main thread for (almost a) second. I am only rendering 100 simple elements and iOS can handle it even with a much greater pixel density. On Android, this issue is reproducible for me even on a high end phone.
React Native version:
System:
OS: Linux 5.4 Ubuntu 20.04.1 LTS (Focal Fossa)
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Memory: 133.11 MB / 7.67 GB
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 15.6.0 - /usr/local/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 7.4.0 - /usr/local/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 26, 28, 29
Build Tools: 27.0.3, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java: 1.8.0_275 - /usr/bin/javac
Python: 2.7.18 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2
npmGlobalPackages:
*react-native*: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Automatically translate off-screen components into view (on Android) and you will see it takes an unreasonably long amount of time.
Description
On Android, when translating off-screen components onto the screen, it takes a very long time. When the function to bring them on-screen is triggered, it seems to completely block the main thread for (almost a) second. I am only rendering 100 simple elements and iOS can handle it even with a much greater pixel density. On Android, this issue is reproducible for me even on a high end phone.
React Native version:
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Automatically translate off-screen components into view (on Android) and you will see it takes an unreasonably long amount of time.
npm i
npm run android
Expected Results
I expect Android to render the off-screen elements in a reasonable amount of time.
Link to repository and demo
https://github.com/darajava/render-bug-android-react-native
See these 2 videos for a comparison of how Android vs iOS handles it:
Android: https://youtu.be/KBP2HHMzAiU
iOS: https://youtu.be/fw-Prh_9HhY
I believe this is a bug in Android related to #28894
Even a workaround would be great.
Edit
I removed animations in the original repo. The problem is slightly improved, but persists and remains unusable.
The text was updated successfully, but these errors were encountered: