Does using a document fragment really improve performance?

后端 未结 7 1400
臣服心动
臣服心动 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:32

    
    
    
        TODO supply a title
        
        
    
    
    
    

    the result is no fragment: 1615.278ms testFragment.html:36 has fragment: 2908.286ms

    so,no Fragment is more faster. I think the reason is the chrome had do some thing.

提交回复
热议问题