I found an interesting article about will-change
property in CSS (which allows to tell the browser beforehand what will change and react proactively). The main reason behind this property is to improve the performance.
As far as I understood I can use it in the following way: jsFiddle (click on the square)
<div class="element"></div>
.element {
width: 50px;
height: 50px;
margin:30px;
background: red;
transition: transform 1s ease-out;
}
.element:hover {
will-change: transform;
}
.element:active {
transform: rotate(90deg);
}
So far so good, but in order to speak about improving in performance, there should be a way to measure this improvement.
So is there a way to measure performance, CPU/GPU utilization with and without will-change
?
At the time of writing of this article, only Chrome Canary 36+, Opera Developer 23+, and Firefox Nightly support the will-change property. There is an intent to ship it to the stable channel too.