We facing performance issues while data rendering on UI. Due to security reason's I have altered business scenario and had below scenario replicated.
Project Technical Stack :
- UI > Angular,
- Backend > Java 8 + Spring,
- Database > Oracle
Details :
We have one api (/mainAPI) responsible for returning List of Countries and List of Cities. This API is taking around 7~13 seconds to respond.
We have another api (/detailsAPI) which gets triggered from link of particular city to get the details of list Colonies and list of people living in it or List of sub colonies if any and list of people living in particular sub colony. This API is taking around 8~15 seconds to respond.
Business requirement is user can provide details of people like mobile number, age etc and save it.
List countries (/mainAPI)
List cities (/mainAPI) List colonies (/detailsAPI) List people (500) (/detailsAPI) List Sub colonies (/detailsAPI) List people (500) (/detailsAPI)
Our client is looking for some solution to increase performance in API respond time. Below are some of the areas we have but still we are looking for some more good suggestions.
Option 1: To render all data in one API and have some pagination logic in it. (But we not sure how to have pagination in inner lists as we have multiple level of lists)
Option 2: Call the second api (/detailsAPI) in next and have flat structure for data then apply pagination on that.