Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Improving the animation's performance


Working with CSS animations can be very rewarding, but we must be careful of the performance—if not done with care, animations can lead to unnecessary demands on the browser or can drain the battery power if you are working on a mobile device!

Unfortunately, a number of factors exist, which can affect performance and over which we may not have any control:

  • Browser performance: All browsers behave differently with CSS3 and JavaScript.

  • GPU performance: Some browsers now offload animation and transition operations to the GPU, in which case, the speed/performance is limited by the GPU. If you're on an integrated Intel GPU, it's not likely to be very smooth compared with a discrete NVIDIA or AMD graphics card.

  • CPU performance: The main CPU will be used if the browser doesn't offload to the GPU (and therefore, become the bottleneck).

  • The number of other tabs/windows opened in a browser: Browsers often share processes across tabs, so other animations or CPU...