Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slows down iphoneX #10

Closed
jemilox opened this issue Oct 26, 2018 · 11 comments
Closed

Slows down iphoneX #10

jemilox opened this issue Oct 26, 2018 · 11 comments

Comments

@jemilox
Copy link

jemilox commented Oct 26, 2018

Was using this until we noticed huge lag problems on only the iphoneX.

Narrowed it down to this library. Not completely sure what the issue was, but removing it for now.

@browniefed
Copy link
Owner

Thanks, I'd be curious if you could share an example of the string you were attempting to tick?

@jemilox
Copy link
Author

jemilox commented Oct 29, 2018 via email

@browniefed
Copy link
Owner

Sorry, should have clarified more. Were you rendering a lot of these? What was the situation where you were seeing slowness.

@jemilox
Copy link
Author

jemilox commented Oct 29, 2018 via email

@browniefed
Copy link
Owner

Are you sure you didn't turn on slow animations?

@browniefed
Copy link
Owner

I believe you can toggle with cmd + shift + t, and or with the simulator open you can toggle it from the debug menu.

@jemilox
Copy link
Author

jemilox commented Oct 31, 2018 via email

@gilberger
Copy link
Contributor

I've been experiencing the same issue.

Seems to be something with the handleMeasure function, triggered by onLayout prop of the container View.
the solution I found was to verify that this.state.measured is false before updating the height of the layout.

also added a PR for that #11

@browniefed
Copy link
Owner

v2.20 has been released.

@jemilox
Copy link
Author

jemilox commented Nov 14, 2018 via email

@slorber
Copy link
Contributor

slorber commented Feb 11, 2019

Hi,

I can confirm the slowness on iOS.
We noticed this on some iphone XS, which was surprising because the app did fine with older iphones.

It has been reported with an iphone 7 also.

I have not been able to reproduce this on my own ios hardware devices (older)

It seems @gilberger solution fixes the problem, but a bug remains due to react's event pooling. We must call e.persist() because when using setState with an update function (like it is now) there's no guarantee that this fn will be called in same batch and in my case it lead to errors.

PR with a simple fix here: #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants