Re:Mozilla can produce near-native performance on the Web
by pcwalton on Wednesday May 22, 2013 @11:13PM
(#5755126)
The browser vendors definitely do micro-optimize these. DOM binding performance is measured in nanoseconds these days.
[ Parent
| on HN ]
Re:Mozilla can produce near-native performance on the Web
by MatthewPhillips on Wednesday May 22, 2013 @11:20PM
(#5755159)
Then what is it?
Re:Mozilla can produce near-native performance on the Web
by ricardobeat on Wednesday May 22, 2013 @11:45PM
(#5755238)
Repaints/reflow. DOM+CSS+JS is a complex system. Watch this: http://www.paulirish.com/2011/dom-html5-css3-performance/
Re:Mozilla can produce near-native performance on the Web
by wyck on Thursday May 23, 2013 @01:18AM
(#5755474)
To 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.
Re:Mozilla can produce near-native performance on the Web
by bzbarsky on Thursday May 23, 2013 @01:48PM
(#5758231)
The 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.