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.

Paper's button seems to be slower

See original GitHub issue

Current behaviour

The button seems to be not as responsive as expected. It just feels laggy. The onPress function seems to be fired after the animation is finished? Please take a look at the gif below where compare the Paper’s button with Element’s button. The logic in the onPress is exactly the same code.

This only occur on mid/low end device. FYI, my device is running on SD 636.

Expected behaviour

Button should be responsive.

Code sample

https://snack.expo.io/@elabar/paper-button-slow

Screenshots (if applicable)

Highlight:

  • The button seems to be hold on at the ‘pressIn’ state for awhile? (I did not hold the button) validate_slow

Highlight:

  • The button seems to be hold on at the ‘pressIn’ state for awhile? (I did not hold the button) And start the loading afterwards. loading_slow

What have you tried

The problem was found in one of my production apps first. I tried creating a reproduce with a clean npx react-native init, and I can confirm this is a valid issue. The gif above is run on development mode on purpose to show the sluggishness easily.

Strange thing is, this problem is more severe with RN CLI. It feels much better with expo.

I then check on react-native-elements codebase. The main difference I found is Paper is using requestAnimationFrame. Not sure if this is related tho.

Your Environment

software version
ios or android Android 11
react-native 0.64.2
react-native-paper 4.9.2
node 14.16.1
yarn 1.22.10
expo 42.0.1
react-native-vector-icons 8.1.0

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:28

github_iconTop GitHub Comments

2reactions
fgagnetencommented, Aug 20, 2022

@lukewalczak @Trancever Is there any update on that? Using the new arch works better but still having issues. It is terrible slow on old devices.

1reaction
fgagnetencommented, Jul 11, 2022

@raajnadar Uploaded a repo in which I can reproduce with my Galaxy J5 (2016) (SM-J510MN) Android’s version 7.1.1.

You can checkout from here: https://github.com/fgagneten/react-native-paper-performance-test

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Slow Printing [Easily & Quickly] - Driver Easy
In the pop-up window, navigate to the Paper/Quality tab. Select Plain Paper in the Media or Paper Type field. Under Quality Settings or...
Read more >
13 Common Printer Problems and How to Fix Them
Slow prints are usually caused by sluggish or out of date software or a spotty wireless connection. For a quick fix, make sure...
Read more >
How to Fix Slow PDF Files - Small Business - Chron.com
Open a slow PDF in Acrobat, select the File menu and choose "Save As." Click "Optimized PDF" to display the PDF Optimizer dialog...
Read more >
How to Fix Common Paper Shredder Problems? E.g. Paper-Jam
Paper not being shredded properly. Shredder hesitating to start or producing high pitched noise, grinding noise, or more noise than usual. Paper ......
Read more >
How to Fix Slow Printing in Windows 11/10 PC?
Hence it can be fixed by changing the print speed and print quality settings. The printout quality is inversely proportional to the print...
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