3 ms·
This is pretty much the root of it, it's not so much the DOM as it is the dependencies involved in layout, paint, and compositing. Anything that might re-trigg
by Crespyl 9y ago
This is pretty much the root of it, it's not so much the DOM as it is the dependencies involved in layout, paint, and compositing.
Anything that might re-trigger layout in particular will have a noticeable impact on complex sites. That can be adding or removing nodes or just adjusting some CSS rule or adding/removing a class.
There is a lot of work being done recently to allow browsers to distinguish exactly which CSS rules can cause relayout, and which nodes can be changed in which ways without affecting other nodes. There's also work to better separate out exactly which stages depend on which pieces so that more work can be done in parallel and more work can be re-used (don't need to re-render this sub-tree X if we know for certain that a change over here in Y can't possibly affect it, that kind of thing).
Mozilla Servo/WebRender is probably the most interesting project right now if you want to dig deeper.
- brad0 9y agoThanks mate this is great info. I'll read up on servo when I get a chance.