> Fast enough to recompute your entire UI every
frame
Yet, when I scroll the front page, made with Clay, it stutters and feels like it can barely handle smooth scrolling, even on a modern Apple Silicon laptop.
Author here. I'm sorry that it performs poorly on your machine - if it makes any difference, it's the rendering that is slow, not the layout.
The HTML examples are more meant as a demo than anything else, as the library actually doesn't do any rendering itself at all, it's exclusively a layout tool.
I'm honestly not sure why the performance differs significantly between machines - I'm on an M1 mbp / firefox and it scrolls at 120 fps for me.
Hi, thanks for the response. It’s not actually rendering using native browser features, is it? I think that’s the reason. For example, on mobile, in which it also has problems for me in addition to the laptop, if I do a pinch zoom on the webpage, it all messes up and is not usable. I frequently do this on mobile to zoom in on text that I have trouble reading or images, etc.
On mobile, iPhone 15 PM, feels janky as well. It’s subtle but it’s there. Thought it was just me, but checked the comments to find similar experiences.
i'm guessing that this is because safari doesn't allow the layout code (or anything else) to run while it's scrolling, which with normal websites (which don't use fixed positioning for everything) results in less janky experiences, and was famously critically important to get reasonable scrolling on the original iphone. it doesn't matter how fast clay's algorithms are if they're not allowed to run
(otoh when i try to load the web page it doesn't work at all, not even jankily, if we're talking about https://www.nicbarker.com/clay)
> Fast enough to recompute your entire UI every frame
Yet, when I scroll the front page, made with Clay, it stutters and feels like it can barely handle smooth scrolling, even on a modern Apple Silicon laptop.