Note that there are some explanatory texts on larger screens.

plurals
  1. POData Retrieving is very slow
    primarykey
    data
    text
    <p>We are developing a Hybrid App and here data is fetched from the server. The data is in JSON format, but it takes more than 15 seconds to load the data from server.</p> <p>Here is the sample code :</p> <pre><code>$(document).ready(function(){ $("#cardetails").tap(function(event,ui){ $.ajax({ url:'http://wwwsampleurl.net/json/jsn_cmp.php?json=1&amp;rcg_mobile=2&amp;lan=en&amp;callback=ajax_eup&amp;pick_up_loc=AGPT01&amp;drop_off_loc=AGPT01&amp;country_des=ES&amp;country_user=AE&amp;currency=EUR&amp;day_drop=Tue&amp;day_pick=Tue&amp;age_driver=30&amp;uid=0&amp;num_days=7&amp;pick_up=2722&amp;drop_off=2722&amp;pick_up_day=13&amp;pick_up_hour=10&amp;pick_up_minute=00&amp;pick_up_mon=08&amp;pick_up_year=2013&amp;drop_off_day=20&amp;drop_off_hour=10&amp;drop_off_minute=00&amp;drop_off_mon=08&amp;drop_off_year=2013', data:'', contentType: "application/json; charset=utf-8", type: "POST", dataType: "json", crossDomain:true, cache: false, async:false, success: function(data, textStatus, jqXHR){ $.each(data, function(index, val) { if(index=='gen'){ alert("gen data - "+val.pick_up_day); } else if(index=='company_date'){//alert('Load cars') for (var i = 0, len = val.length; i &lt; len; i++) { //alert(JSON.stringify(val[i])); // alert(val[i].car_img); $('#carImages').append('&lt;img src="'+val[i].car_img+'" width="70" height="110" alt="'+val[i].car_group+'" title="'+val[i].type+'"/&gt;'); } } }); }, error: function(XMLHttpRequest, textStatus, errorThrown){alert(textStatus +"-"+ errorThrown);} }); }); </code></pre> <p>});</p> <p>Anyone, please help to improve the performance...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload