I never used that. I wonder how much difference it makes in practice. Also, if I understand it right after digging into it a bit, applying it on too many elements may hurt performance. Since it's difficult to estimate the benefit / cost, it's quite tricky to use.
You're right - will-change needs to be used carefully. Applying it carelessly can hurt performance more than help.
The key is using it only on elements with complex animations. Using it too much or leaving it on when not needed can slow things down.
In practice, will-change can greatly improve animation performance for elements that move, change transparency, or reposition a lot. You'll notice the biggest improvements on less powerful devices or when many animated elements are on the screen at once.
I'd recommend using will-change only on the specific elements being animated. That way, you get the performance benefits while avoiding potential slowdowns.
Thanks for bringing up this point!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I never used that. I wonder how much difference it makes in practice. Also, if I understand it right after digging into it a bit, applying it on too many elements may hurt performance. Since it's difficult to estimate the benefit / cost, it's quite tricky to use.
You're right -
will-changeneeds to be used carefully. Applying it carelessly can hurt performance more than help.The key is using it only on elements with complex animations. Using it too much or leaving it on when not needed can slow things down.
In practice,
will-changecan greatly improve animation performance for elements that move, change transparency, or reposition a lot. You'll notice the biggest improvements on less powerful devices or when many animated elements are on the screen at once.I'd recommend using
will-changeonly on the specific elements being animated. That way, you get the performance benefits while avoiding potential slowdowns.Thanks for bringing up this point!