4 ms·
Then what is it?
by MatthewPhillips 13y ago
Then what is it?
- ricardobeat 13y agoRepaints/reflow. DOM+CSS+JS is a complex system. Watch this: http://www.paulirish.com/2011/dom-html5-css3-performance/ http://www.paulirish.com/2011/dom-html5-css3-performance/
- wyck 13y agoTo add to ricardobeat, it's all repaints and recalculations. Web devs have become overzealous with smashing JS into every nook and cranny to manipulate the dom, it seems to be a battle Google is trying to educate people about, and good on them. Open dev tools in chrome, the click network/frames, hit record and refresh the page. Do this on a sluggish site that uses tons of js and you will see the problem.
- bzbarsky 13y agoThe most commons causes of slowness I've seen are: 1) Interleaving changes to style and requests for layout information: this causes lots of relayouts instead of just one. 2) Using libraries that under the hood helpfully end up doing item #1 for you. 3) Using complex graphical effects (blurred shadows are a common one, as are certain gradients) that are actually very expensive to implement and may not be amenable to being GPU-accelerated.