title: jQuery Large List Performance
body: <p>I am having performance issues with a dynamically created, layered list with jquery. I retrieve my data via JSON from the server and then rendering it client side with this:</p>
  
  <pre><code>for (var i = 0; i &lt; myArray.length; i++){
      var subArr = myArray[i];
      var newElm = "&lt;li id="+subArr.node_order+" value="+subArr.id+" class='list-item'&gt;&lt;span&gt;"+subArr.node_name+"&lt;/span&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/li&gt;";
      var parent = $("li#"+subArr.parent_id+" ul");
  
      if(parent[0] != undefined){
          $(parent[0]).append(newElm);
      } else{
          sortable.html("&lt;ul&gt;"+newElm+"&lt;/ul&gt;");
      }
  }
  </code></pre>
  
  <p>The list can be up to 15,000 list 'li' items. with about 6500 items, the data is retrieved from the server in approx. 1.5 seconds but takes about 4.4 seconds after that to build and paint the list. This is by far the quickest i've seen so far but 11k+ items is normal.  I also want to minimize any pluggins because this list is drag/droppable and pretty dynamic so drag/droppable doesn't become activated until hovering over the 'span'. </p>
  
  <p>Any pointer are greatly appreciated!</p>