css3 - CSS will-not-change -


there new css attribute, called will-change, using can define properties changed frequently, browser can optimize it. example:

.element {     will-change: transform, opacity; } 

but opposite? there suggestions or working drafts will-not-change? using possible hint browser, that properties never change (constants), can optimizations on it?

browsers optimize layout algorithms properties "will not change" default. will-change way opt properties in might change (despite "will" in property name might suggest) browsers can perform necessary optimizations beforehand when properties do change (from initial value, @ least).

think of way: properties aren't listed in will-change have been optimized "will not change", or "whether change or not makes no meaningful difference in performance."

for example, will-change declaration tells browser create composition layer .element elements, in event need transformed or alpha composited, rendering hardware accelerated get-go. since will-change declaration doesn't apply elements without class, browser assumes other elements never transformed or alpha composited, , such don't need composition layer. not creating composition layers them, browser has optimized rendering of elements not hardware accelerating them unnecessarily.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -