Fastest way to add/remove multiple elements in DOM

前端 未结 2 540
-上瘾入骨i
-上瘾入骨i 2021-01-13 00:21

Edit: It\'s not a duplicate of \"Fastest DOM insertion\" because it includes the event listeners variable too. Anyway I will edit the question.

I wo

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 00:49

    Google/SO are your friends:

    For example for question 1/2 , see Fastest DOM insertion

    I think, you can search for a lot of them.

    Another good place to search for performance comparison beside google/SO is to use jsperf: http://jsperf.com/browse and http://jsperf.com/popular. I'm pretty sure there are response to a lot of your question there. And if you have some questions that are unanswered, you can test them as well in the main page http://jsperf.com/.

提交回复
热议问题