Visit the landing page on a low power device. Carson also noticed low perf of the landing page on a macbook running firefox which I bet is related.
π€ Expected Behavior
Beautiful 60fps rendering across platforms.
π― Current Behavior
Runs at a low framerate on Android and makes the whole experience choppy (scrolling etc)
π Possible Solution
Tested locally that only animating the transform was performant on Android. Did not test that addresses the Firefox case. Likely need stylistic tweaks to the animation if only animating transform so didn't make a PR.
π Bug Report
The current nimble.ni.dev landing page animation runs very slow on mobile devices (Android pixel 3a).
Found that it is due to animating the
stroke-dasharray
property: https://github.com/ni/nimble/blob/6d1ae5605adda84ad46fd47c1dbeb500f6ca9a6e/packages/site/landing/styles.scss#L43In order to have the best performance across a wide set of devices we should only animate the
transform
andopacity
properties, see web.dev's article Why are some animations slow?π» Repro or Code Sample
Visit the landing page on a low power device. Carson also noticed low perf of the landing page on a macbook running firefox which I bet is related.
π€ Expected Behavior
Beautiful 60fps rendering across platforms.
π― Current Behavior
Runs at a low framerate on Android and makes the whole experience choppy (scrolling etc)
π Possible Solution
Tested locally that only animating the
transform
was performant on Android. Did not test that addresses the Firefox case. Likely need stylistic tweaks to the animation if only animatingtransform
so didn't make a PR.π¦ Context
Checking out the awesome site on my phone.
π Your Environment
Android Pixel 3a Chrome 108