Coder Social home page Coder Social logo

Comments (11)

ashthornton avatar ashthornton commented on May 24, 2024

Hi @jbarkun, it's been a while since I've done some serious performance testing in Safari as I don't have easy access to a Mac at the moment. But could you check the performance in these GSAP ScrollTrigger demos from other popular smooth scroll libraries and see if there's any difference?

https://codepen.io/GreenSock/pen/1dc38ca14811bc76e25c4b8c686b653d
https://codepen.io/GreenSock/pen/oNLqgBm

from asscroll.

JonQuayle avatar JonQuayle commented on May 24, 2024

Just chiming in here as I'm also experiencing a significant degrade in performance on Safari compared to Chrome and Firefox. Chrome is far and away the smoother experience, followed by Firefox which is smooth but seems slower to scroll through a page. Safari is a very jarring experience - I will admit I haven't been able to upgrade my machine to the latest OS (could be a factor) but it would be good to have comparable performance across the board if/when that is a possibiltiy. The demos above seem to work pretty much the same across those three browsers from my experience. Having said that, you've done a great job so far :), and I love the fact your library works across mobile with its own scroll speed settings.

from asscroll.

ashthornton avatar ashthornton commented on May 24, 2024

Thanks @JonQuayle I will take a proper look into why it's struggling so much in Safari when I get the chance.

from asscroll.

jbarkun avatar jbarkun commented on May 24, 2024

Hi @ashthornton, thanks for looking into this. I looked at the links you provided in both Chrome and Safari, along with ASScroll's GSAP demo again. There was a certain degree of sluggishness present in all three demos, but like @JonQuayle noted, it wasn't all that visible in locomotive or smooth-scroller and probably wouldn't have been noticed at all without a side-by-side comparison in Chrome. ASScroll's demo on the other hand, was noticeably slower to respond.

I also haven't updated my machine to the latest OS yet; it isn't compatible with some critical programs right now. So that may be a factor if Safari has gotten better about transforms in the latest update. I'll see if I can nab someone with an updated OS to test for us.

from asscroll.

jbarkun avatar jbarkun commented on May 24, 2024

I've talked with a colleague with the most recent update of Safari, and they confirmed that the issues are still present regardless of the update.

from asscroll.

ashthornton avatar ashthornton commented on May 24, 2024

Thanks for confirming @jbarkun

from asscroll.

ashthornton avatar ashthornton commented on May 24, 2024

I now have access to a 2014 Macbook Pro and I've been testing to try and replicate the Safari performance issues mentioned here, but I'm unable to see any major drops in framerate when viewing ASScroll-based projects. There are some minor frame drops occasionally, but for the most part it matches the performance of Chrome.

Can you provide an example that gives you issues?

from asscroll.

JonQuayle avatar JonQuayle commented on May 24, 2024

Feel free to check out my site for the issue I was seeing - https://www.jonquayle.co.uk. Still in the process of a bit of a redesign but I left it live. It is buttery smooth in Chrome by comparison. Thanks @ashthornton.

from asscroll.

ashthornton avatar ashthornton commented on May 24, 2024

@JonQuayle in your case, it seems that ASScroll may not be the bottleneck of your site when it comes to performance. It looks like some of the most expensive operations come from a script called 'midnight.jquery.min.js'. It's doing a lot of calculations that cause layout thrashing and reflow, so this isn't going to help. It seems that this script is also requesting an additional animation frame on top of the one from ASScroll.

I noticed you're also using GSAP which uses it's own internal RAF loop. For starters I'd suggest merging these into one loop, which should give a noticeable performance boost. Some detail on that can be found here in the docs

If you don't see a decent improvement after dealing with these issues, I'd be interested to see how one of the other popular smooth scroll libraries performs in place of ASScroll on your site.

from asscroll.

JonQuayle avatar JonQuayle commented on May 24, 2024

@ashthornton Ah I see, thanks for pointing me in the right direction. I'll give this a go and see how it gets on, thanks.

from asscroll.

josueadelima avatar josueadelima commented on May 24, 2024

Hello I'm using a 2015 MacBook Pro with macOS Big Sur 11.4 and Safari Versión 14.1.1 (16611.2.7.1.4); I don't see mayor differences with Chrome 91.0.4472.77 (Build oficial) (x86_64) usigin this demo https://codepen.io/GreenSock/pen/rNyyxBP

from asscroll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.