question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android scroll performance is really bad IF text selection is enabled

See original GitHub issue

Problem

There was a regression in Android scroll speed. On 8/25 the scroll speed was acceptable, and on the latest master is really slow.

Solution

Run a git bisect and figure out what broke it

cc @quinthar

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
quintharcommented, Sep 13, 2020

Actually going to go LOW, as I don’t even know that this is important for genuine day to day usage. I have a lot of Android apps that can’t select text

1reaction
AndrewGablecommented, Sep 11, 2020

tl;dr: The contractor has recreated the issue and is looking into fixes for RN core.

Here is the current conversation:

[9/10/2020 3:38:24 PM] Andrew Gable: Hi Nazim Gadzhiagayev - We have actually started to implement our own React Native application in house, but we would love to have you help us with bugs and issues we run into as you are a React Native expert!

The current bug we are running into is we have a <ScrollView> with quite a few <Text> components in it (~300-1000 text elements). On Android when we set the <Text> component’s property selectable to true, we get very poor scroll performance. When it is set to false, we get great scroll performance at 60 FPS.

Would you mind looking into this for us? If so, could you:

  1. Make sure you can recreate this bug (If not, we will share more details)
  2. Keep us updated on your progress on this bug daily

Thank you, I look forward from hearing back soon.

  • Andrew

[9/10/2020 3:44:14 PM] David Barrett: To expand on this, ideally you would solve the bug in the most “correct” way possible – not just hack around it, but contribute a bugfix into the mainline react native code. Let’s figure out how easy/hard it is to engage with and contribute to the core RN maintainers.


[9/11/2020 11:49:42 AM] Nazim Gadzhiagayev: Hey, i was able to reproduce the issue. (First suggestion) Ideally we should prefer FlatList over ScrollView as it uses VirtualizedList under the hood and has better performance. But i noticed that you can’t use [selectable] as it doesn’t work on Android. I have spent couple hours on investigating RN code but haven’t founf any relevant solution yet. I will update you as I progress. Thanks.


[9/11/2020 2:23:37 PM] Andrew Gable: Thank you for the update Nazim-

We would like to continue to use ScrollView as it has great performance on web, with acceptable performance on iOS/Android. So please do continue to update us on any improvements you can make on ScrollView.

  • Andrew
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Android Phone scrolling problem-Carlcare
From there, find and select the app with scrolling problems. (E.g YouTube or Chrome). Finally, tap Clear cache, then tap Clear storage.
Read more >
Slow rendering - Android Developers
Rendering performance: UI Thread ... If Record View#draw is taking a long time, it's often the case that a bitmap is being painted...
Read more >
Disable Webview scrolling and enable text selection [duplicate]
1 Answer 1 ... You can try the code below: mTestWebView.setOnScrollChangeListener(new View.OnScrollChangeListener() { @Override public void onScrollChange(View v, ...
Read more >
The 15 Best Android Developer Options Worth Tweaking
You can enable this setting if you want to experience the awful performance that killing every app brings, but you shouldn't leave it...
Read more >
Take control of your scroll - customizing pull-to-refresh and ...
Turns out this behavior is called scroll chaining; the browser's default behavior when scrolling content. Oftentimes the default is pretty nice, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found