An unofficial, read-only Hacker News reader.

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

468 points by vinhnx 4 days ago | rida.dev | 149 comments on HN

View full thread · View on Hacker News

Comment thread (5)

  1. In case you’re wondering “why isn’t 120fps enabled by default”: on the native side iOS selectively enables it for transitions that cover a lot of the screen. If you use SwiftUI or UIKit it’s done for you but there are switches on CAAnimation (IIRC) that control it.

    The web has no equivalent. So it’s all 120hz all the time, or not. And that would drain the battery more than Apple would like.

    Replies (1)
    1. Web browsers composite layers just like CoreAnimation, and the browser ostensibly knows how big each element is. Seems like they could invent some kind of heuristic for the web just like they ostensibly already have for UIKit.
      Replies (3)
      1. That will only happen if governments enforce anti trust to include web as a type of third-party app store.
      2. I don't think the UIKit heuristic is that intelligent, it's simply "is this a transition between two view controllers". Again, the lack of any formalised notion of "root views" or whatever on the web would be a blocker here I think. That said I'd be curious what happens with the View Transitions API, since it's about as close as you'll get to that.
      3. Safari actually does literally use CoreAnimation to composite web pages.