title: jQuery page freezing while updating DOM with big amount of data
body: <p>I have a jQuery post method whicih looks like this:</p>
  
  <pre><code>$.post("/SearchCompetitor/Index", { username: _username }, StartLoading())
                             .done(function (data) {
                                 if (data !== "UsernameError") {
                                     StopLoading();
                                     var brands = $('&lt;table /&gt;').append(data).find('#tableProducts').html();
                                     $('#tableProducts').html(brands);
                                     $("#tableProducts").simplePagination({
  
                                         // the number of rows to show per page
                                         perPage: 10,
  
                                         // CSS classes to custom the pagination
                                         containerClass: '',
                                         previousButtonClass: '',
                                         nextButtonClass: '',
  
                                         // text for next and prev buttons
                                         previousButtonText: 'Previous',
                                         nextButtonText: 'Next',
  
                                         // initial page
                                         currentPage: 1
  
                                     });
                                     var header = $('&lt;div /&gt;').append(data).find('.bs-glyphicons').html();
                                     $('.bs-glyphicons').html(header);
                                     $('#tableProducts thead, #header').fadeIn("slow");
                                     $('#emptyText').hide();
  
                                 }
                                 else {
                                     StopLoading();
                                     ShowMessage("No eBay user was found under: " + $('.txtSearch').val());
                                 }
                             })
                             .fail(function (data) {
                                 StopLoading();
                                 ShowMessage("Something went wrong, please try again!");
                             });
  </code></pre>
  
  <p>When the post data object doesn't contains a lot of items inside then its fairly okay and it loads without problems...</p>
  
  <p>But when I'm updating the table with 2000+ items inside, it presents a huge issue, I was testing it on firefox browser and it literally crashes every time I work with 2000 + returned items...</p>
  
  <p>My question is, is there any way to avoid browser freezing, maybe some "client side async method" like C# has when using async method to prevent user UI from freezing when working with big chunks of data??</p>