Joined April 2014
·

Joseph Orbegoso Pea

Earth.
·
·
·

Interestingly, it seems browsers these days have optimized, so that multiple writes to the DOM in the same synchronous code don't cause reflow, then finally the next frame will reflow and paint. In the perf test you linked, the appending version is the fastest for me in Chrome. It probably used to be slower than the DocumentFragment version, and the DocumentFragment version probably hasn't gotten slower, but the appendChild method is now faster! This is why some people suggest to batch reads and write and not mix them, otherwise a read can trigger a reflow, so interleaving them together causes many reflows.

This is absolutely absurd. Why keep a list of devices that's going to change in the future? Browser makers need to give us the screen's hardware pixel density. With that we can display anything we want.

Achievements
79 Karma
0 Total ProTip Views