-
Notifications
You must be signed in to change notification settings - Fork 224
Performance on mobile #49
Comments
@tusharmath I think you can disable touch behavior for now. I turned off as well. |
@woogenius I don't think that's a solution. |
Yeah, we should debounce the onTouchMove calls to not clog up the paint queue. Pull request welcome. |
In addition to debouncing, it would be nice if touch events could all be made passive: |
Good point. To use passive listeners, we would have to attach our DOM Event listeners ourselves using a ref-callback instead of having React attach them. |
Yeah, facebook/react#6436 :/ |
you can fasten the module without using the passive listeners : your main issue comes from React itself: Currently, when What you should do is set a ref to the sidebar and directly set the style by doing something like: |
and also, you should throttle the touchMove function |
Hey, guys. I have a solution that is high-performance enaugh - https://github.com/timbset/react-advanced |
I have a one plus one running chrome on android. I tried the side nav example on it and have attached the timeline data below. I am not able to achieve anywhere close to 60fps and that's because of the expensive VDOM diffs being done on every touchmove event.
ReactSideNavPerf.json.zip
This one, which doesn't use lib, turns out to be much faster — https://googlechrome.github.io/ui-element-samples/side-nav/
The text was updated successfully, but these errors were encountered: