php - How to load large a JQuery AJAX response faster? -


i'm using php script returns json array that's requested ajax script.

my problem the size of array, since must show more 10,000 items, associative array. problem time web browser employs reading json:

$.ajax({     url: "urlto/product.php",     datatype: 'json',     timeout: 800000, }).done(function (o) {     (var = 0; < o.length; i++)     {          // o.[i]....     }  }); 

how can decrease request time? how can decrease time of loading? specifically, not time of php execution, load time of ajax , web browser. thanks.

instead of using for-loop try use array.prototype.map. https://developer.mozilla.org/en/docs/web/javascript/reference/global_objects/array/map maybe you're gaining performance against loop.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -