3 ms·
What the site fails to explain is why these things are important. Changing a property that effects a layout change means the browser will need to redraw that el
by onion2k 12y ago
What the site fails to explain is why these things are important. Changing a property that effects a layout change means the browser will need to redraw that element and anything that the geometry has pushed around. A full repaint is slow so if you're doing it often the user's experience will be very negatively impacted. A composite event should be pretty fast as it happens largely on the GPU hardware.
For this reason, for example, animating things with a CSS transform is considerably better for the user than animating a property like left or margin-left. Animating with CSS can be much better than something like jQuery's animate().
If you want to know more, google 'layout thrashing'.
- callum85 12y ago"fails to explain" is a bit harsh. It's a cheat sheet for people who already know about layout thrashing.
- zevyoura 12y agoIf you click on a property name, it actually gives a pretty decent explanation. I agree a link to additional overall context could be useful, but I think you're overstating the gap.