An unofficial, read-only Hacker News reader.

Bypassing iOS Safari's 60 FPS Limit to Build Web Applications That Feel Native (opens external site)

467 points by vinhnx 3 days ago | rida.dev | 149 comments on HN

View full thread · View on Hacker News

Comment thread (2)

  1. The Liquid Glass part of the page didn’t bother me because it was clearly just there as a demo widget.

    the question I have is this: if the difference between 60hz and 120hz matters, then why wouldn’t you choose a different software stack that compiles down to native code? You end up with better performance, better battery life, and cleaner code.

    I get this page should be treated as a lab demonstrating a solution. But it is, in my humble opinion, the wrong solution to that problem presented because it comes with far too many negative trade offs.

    And the AI point you raise is a great one. Because the old argument of sticking firmly with the web stack (“I only know how to use JavaScript so therefore I’m going to shoehorn JavaScript into every problem”) no longer applies.

    Replies (1)
    1. That's fair if you evaluate this demo as a single holistic "solution," but I think it should be seen as a set of learnings that enable different behaviour.

      As for whether refresh rate matters, the community seems to think so. The WebKit bug forum alone is filled with framework authors, drawing applications, game engine developers, etc., all begging Apple to drop the cap.

      That drawing application? It could use the controllers on their canvas and immediately double the resolution of their brush stroke interpolation. PWAs never had the ability to render above 60 FPS, even if the user opted out of the limit, now they can. These two things can be easily implemented with minimally invasive code. This demo is just a hybrid on the extreme end.

      Even if you throw away the I/O frequency, even if a developer were to now ask "hey, should this be on the compositor instead?" is a massive win for performance and battery life.

      People have already begun to take small learnings from this and apply them to their projects, my favourite is this user's portfolio (https://github.com/decepulis/portfolio-svelte-site/pull/12) where they were able to figure out why, on scroll direction change, their rAF was slowing to 10 Hz, and citing this post as the source for the fix.

      For some reason, people continue to build for the web. Whether it's an attempt to opt out of the underside of Apple's thumb, a preference for web frameworks, wanting cross-platform or ease-of-access, not wanting to go through App Store Connect, etc., this puts more tools in their tool belt. It's not meant to be an alternative for people considering building a native application.

      There is a reason I chose not to make this a library, or a framework. This is meant to be something people can throw their agents at, and fix the problems they encounter.