website icon indicating copy to clipboard operation
website copied to clipboard

Fix Safari CPU on homepage

Open tigt opened this issue 3 years ago • 3 comments

Fixes https://github.com/marko-js/website/issues/101

The .demo-page-loading-linked animations may have to be pure CSS animation, since Safari is still grumpy about it even if we're just toggling opacity: 0.

Hm… or will-change: opacity. That might help, but pure-CSS would be more efficient than the requestAnimationFrame layer we have right now. That JS was first written for a scroll-linked effect… But now that we're animating a simple loop, full CSS may be the best choice.

tigt avatar Jun 24 '22 17:06 tigt

Trying out using a gradient for the image loading placeholder instead of filter:

Before (filter) After (stacked radial-gradients)
A grayscale blur A slightly different grayscale blur

I also grabbed a clip of it in motion, since it’s only visible for a split second anyway:

https://user-images.githubusercontent.com/8072522/177829749-172961ba-f090-4001-8661-f89de2f276ad.mov

Is that the filter or the gradient? I don’t remember! The filename might be wrong!

tigt avatar Jul 07 '22 17:07 tigt

What I currently have for the hydration animation:

https://user-images.githubusercontent.com/8072522/178571826-61eec484-406a-48e2-a7d7-4a9e3a8c17d3.mov

Not as good as the existing one, but I’m not sure how to get that particular animation while hardware-accelerating it.

tigt avatar Jul 12 '22 18:07 tigt

PR Preview Action v1.1.1 :---: :rocket: Deployed preview to https://marko-js.github.io/website/./pr-75/ on branch gh-pages at 2022-08-23 18:16 UTC

github-actions[bot] avatar Aug 23 '22 18:08 github-actions[bot]