3 ms·
Based on what?
by realharo 6y ago
Based on what?
- timw4mail 6y agoJavaScript downloading and parsing is much more computationally expensive than html parsing. The DOM seems slow, I think mostly because it requires translating between rendering systems - the representation of the html has to be updated, the styling has to be applied, and the change has to be painted on screen. This explains why updating a documentFragment as a batch operation is much faster than changing the dom directly in a loop.