I am developing an application that has some elements of the database, so I have to make ajax calls for each component, I have about 50 tables which have brands, models, product types, etc.
It is so to do it in a SPA I call all those elements via ajax to avoid having to reload the page. Only for brands, models and product types, there would be 150 calls ajax, the calls I make them like this:
$.ajax({
type: "POST",
dataType: 'json',
data: { 'tipo': 'congelador'},
url: "<?php echo site_url();?>"+"/marca/obtenerMarcasbytipo",
success : function(data) {
//console.log(data);
$.each(data, function(key, val) {
//console.log(key+" "+val.id_marca +" "+val.nombre_marca);
$("#marca_congelador").append('<option value="'+ val.id_marca + '">' + val.nombre_marca + '</option>');
});
}
});
My question is:
Can all these calls overload the server, and if so, should you separate all these calls to avoid it?