Does using a document fragment really improve performance?

后端 未结 7 1423
臣服心动
臣服心动 2020-11-30 01:57

I\'ve got a doubt regarding performance in JS.

Say, I\'ve got the next code:

var divContainer = document.createElement(\"div\"); divContainer.id=\"co         


        
7条回答
  •  再見小時候
    2020-11-30 02:24

    I've written a jspref to test this and it appears the node fragment is 2.34 % faster

    http://jsperf.com/document-fragment-test-peluchetti

提交回复
热议问题