-
Hi, I have used smooth-scrollbar throughout my website and have implemented core functionality and animations using it, so it's really not possible for me to remove it for mobile devices even though it's recommended to not use it on large pages, but it's really important for me to use it on mobile as well for core gsap(animation library) functionality to work. If you try to open this link on a slightly older phone (maybe 3-5 years old), the scroll will be very jittery and really laggy, you can test it I want to know if there are some tools or any special tricks to still keep the scroller on the full page and maybe just increase fps slightly just a little bit. Thanks in Advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Another micro-optimization: instead of setting @ehsan-shv do you have any good ideas because you are familiar with GSAP? |
Beta Was this translation helpful? Give feedback.
-
@idiotWu @blitzve0 Hey guys. Daofeng said some points to increase performance. You are using React so make sure that you kill the GSAP timeline on destroying the component(tl.kill()). It's a useful article about React and GSAP. Read it, it has some useful tips. But personally, I have chosen another process in some of my enterprise apps based on how some big studio designs doing. Maybe it's not a good idea but it is what it is. I disabled GSAP and smooth-scrollbar on mobile devices because of performance issues and make the app minimal and simple. If you check the TubikStudio and Cuberto you can see they have the same approach on mobile devices. You can also use pure js and Web API(requestAnimationFrame) to animate your app. It may decrease performance issues. Recently I've seen some websites that are using WebGL and Three.js to animate. It's more efficient than the old approach. |
Beta Was this translation helpful? Give feedback.
-
HI Everyone i finally by luck found the issue that was causing severe framedrops in the scroller on old devices. |
Beta Was this translation helpful? Give feedback.
damping
value: it looks like you are reducing thedamping
value on mobile devices? The smaller thedamping
value, the more frames will be rendered, which may cause the performance to drop. I'd suggest you use a largerdamping
value on mobile devices if possible.Another micro-optimization: instead of setting
elem.style.transform = translate(0, 0)
in every idle frame, try modifying i…