Poor performance / app crash for inverted FlatList with RTL languages

This issue has been created since 2022-11-14.

Description

It appears that with the FlatList component, any time

  1. The FlatList is inverted
  2. The FlatList renderItem is trying to render text in an RTL language, and
  3. The user is trying to view this FlatList on a recent Google Pixel device, then
    the performance of the FlatList is unusably slow.

This is exacerbated when the user is trying to interact with a TextInput in the same screen (as they would in a chat app) - the user is only able to type a few characters before app performance plummets (each frame takes a couple of seconds to render), then the app often crashes entirely.

This bug does not appear to exist with a non-inverted FlatList - the app behaves normally.

Version

0.70.4 (also reproducible on 0.68.2 and 0.69.3)

Output of npx react-native info

System:
OS: macOS 13.0.1
CPU: (8) arm64 Apple M2
Memory: 492.23 MB / 24.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.13.2/bin/yarn
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm
Watchman: 2022.10.24.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /Users/chris/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: 19.0.1 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. Set up a screen with an inverted FlatList and a TextInput (as in the attached snack)
  2. For all FlatList elements render some RTL text (ie, Hebrew)
  3. Run the app on a recent Google Pixel device running Android 13 (tested on Pixel 6 specifically)
  4. Try scrolling the list, then typing a few characters into the TextInput. Within about 10 seconds of typing and/or deleting the app performance plummets

Snack, code example, screenshot, or link to a repository

https://snack.expo.dev/@dukeman330/flatlist-example

More Details About Repo
Owner Name facebook
Repo Name react-native
Full Name facebook/react-native
Language JavaScript
Created Date 2015-01-09
Updated Date 2022-12-10
Star Count 106395
Watcher Count 3660
Fork Count 22685
Issue Count 2288

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
"ODESliderJoint::SetAnchor not implemented" log with PositionJointInterface 0 2022-03-16 2022-12-01
[BUG]: ItemDivider set to false renders a blank ContextMenu item 2 2022-07-15 2022-10-21
vk_bitflags_wrapped! should support const better 0 2022-01-07 2022-09-23
select in large tables 0 2021-06-13 2022-10-08
anyone translated the image to opencv's cv::Mat ? 1 2021-11-20 2022-07-07
15$: Improve error on missing } for class method 0 2022-02-25 2022-10-28
Troubles with package with local dependencies 0 2022-06-24 2022-08-10
[brokenlink] solquemal.com 0 2022-02-19 2022-12-09
Broken link for entry 157 (Öppen) 0 2022-03-27 2022-12-08
[broken link] 149. dom 2 2022-02-07 2022-12-08
cblgh.org and the search @ lieu.cblgh.org is down 6 2021-07-11 2022-12-08
Enhancement: combining -u and -r options 4 2022-06-30 2022-10-05
Revert default tokenizer for JSON field.s 0 2022-05-09 2022-11-25
inOrder Simulation Fails 0 2021-06-24 2022-11-17
Generic: provide a suffix alternative to `:-` 3 2021-10-11 2022-08-27
[Unstable] Fall off ladder when attempting to open hatch. 4 2022-07-28 2022-09-17
How can I extend the types of the CSS property values? 1 2021-11-26 2022-11-28
Redirect to login page after logout from client with data needed for relogging to client 1 2021-02-15 2022-11-06
v1.11.3 breaks signout for me 7 2021-02-09 2022-11-06
Extend support for POV-Ray rendering of charge densities 0 2022-07-20 2022-10-07
Base 64 image getting created on pasting the image on the clipboard 1 2020-08-10 2022-11-24
resolveUrl throws on bad urls 2 2021-07-18 2022-10-04
Python Error When Doing “make build” 2 2022-03-21 2022-12-02
End-to-end tests with Appium failing in CI, WebDriverAgent not listening on 8100 with no failure 9 2021-11-06 2022-09-28
1.2 performance regression 15 2022-07-21 2022-11-11
The list of the output does not coincide with the actual output for get-winuserlanguagelist 0 2022-02-02 2022-11-29
GSoC 2021 Proposal 1 2021-04-10 2021-11-18
'prisma db seed' command errors out with error: sigsegv sevfault on node v18.3.0 with NextJS and TS 9 2022-06-03 2022-10-31
Update button for admin guide from homepage 4 2021-10-26 2022-10-29
Checkboxes not highlighted 3 2021-11-19 2022-11-28
Volo.Abp.Account.Pro.Public.Application - AccountAppService class 2 2022-08-23 2022-10-26
Inverted modes on Dreame L10 Pro 1 2022-10-15 2022-11-28
vsphere-iso: error mounting an image '': Incompatible device backing specified for device '0'. 4 2021-06-22 2022-11-16
Scrollable TimeGrid with allDay events included 0 2022-02-04 2022-11-01
Re-Add possiblility for multiline: Shift+Enter (missing since NC24) 2 2022-05-24 2022-09-29
Update optimization-1.md 0 2021-04-16 2022-12-09
Aqara Temperature and Humidity Sensor ZCL Configuration Request 2 2021-05-01 2022-12-01
slow , tweak to speedup ? 8 2017-10-02 2022-11-28
Unable to get file-type to run in browser (modules strtok3/core and token-types not found) 1 2022-04-25 2022-12-02
[FEATURE REQUEST] Improvements for the UI in the file details screen 3 2022-02-16 2022-10-24
Is It Possible To Continue Finetuning From Checkpoints on Any GPT-Neo Model? 1 2021-07-14 2022-11-22
Arc example rarely executes all threads 5 2022-06-20 2022-12-02
UART only works for 8N1; API exposes functions that mishandle UARTLCR 13 2021-08-26 2022-12-06
Add division and modulo operators to Zen 4 2022-02-04 2022-12-02
too low touch event polling rate with official Raspberry Pi 7inch screen 15 2019-09-12 2022-11-27
java.lang.NullPointerException: Attempt to write to field 'int android.view.ViewGroup$LayoutParams.height' on a null object reference 2 2022-03-28 2022-11-04
Host path duplication encountered with both dsd and apm configured for socket mode 2 2022-07-21 2022-10-25
Fix: Overflow in TSC (Timestamp counter) 5 2021-08-26 2022-12-05
spotify_show_url -> spotify_url 0 2021-01-26 2022-11-12
key() expects exactly 1 argument, 3 given in global search 4 2022-04-11 2022-10-05