I am calling some predefined data from angular service. Since it is huge data(4 MB), In the backend(Java) code, they are getting this data in the server startup and storing it in the session. My Problem is when I am calling that service from any rest client it is taking 5 seconds. But when I call it from UI it is taking 50 to 60 seconds.
When I check in the network tab, status is showing like pending only, but I see the response.
This issue is not coming in local. Only when we deploy in the server getting this issue.
What is the wrong I am doing here. How to handle this much huge data while calling it from angular js.
I am calling service.
using data in the table ..
I am getting all the dropdowns data at a time istead of multiple calls
<tr ng-repeat="list in teamsFilterData" >
<td ng-show="odsObj.teamsFilterData.supportedAttributesList[$index].filter">{{odsObj.teamsFilterData.supportedAttributesList[$index].filter}}</td>
<td ng-show="odsObj.teamsFilterData.supportedAttributesList[$index].filter">:</td>
<td ng-show="teamsFilterData.supportedAttributesList[$index].filter">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle supported-products-default" type="button" data-toggle="dropdown" aria-expanded="true">
Select {{teamsFilterData[$index].filter.split('Supported')[1]}}<span class="caret caret-postion"></span>
</button>
<ul class="dropdown-menu supported-products-default" role="menu">
<div class="input-group col-md-12">
<span class=" glyphicon glyphicon-search"></span>
</button>
</span>
</div>
<li style="margin-left: 10px;" ng-repeat="product in odsObj.teamsFilterData[odsObj.teamsFilterData.supportedAttributesList[$index].name] | filter:searchText | limitTo:10" >
<input ng-attr-name="{{product.id}}" type="checkbox" ng-checked="product.added" >
<label>{{product.filter}}</label>
</li>
</li>
</ul>
</div>
</td>
</tr>