onaio / reveal-frontend

WebUI for the Reveal epidemiological surveillance platform
8 stars 4 forks source link

Improve performance of IRS Plan Page #913

Closed moshthepitt closed 4 years ago

moshthepitt commented 4 years ago

Right now we can potentially make hundreds or thousands of calls to the OpenSRP API when trying to fetch assignments. It seems that we can make this better performing by replacing the many call with just one i.e. fetching all assignments for the plan using something like assignedLocationsAndPlans?plan=identifier.

moshthepitt commented 4 years ago

Right now we are calling this endpoint https://reveal-zm.smartregister.org/opensrp/rest/organization/assignedLocationsAndPlans/23ee9e55-8824-44b1-a826-352dfe2d5c96?plan=f1c3aedf-2c7b-563c-b1e2-5f0af070002b which in Zambia results is hundreds of calls to OpenSRP.

Naima-Bashir commented 4 years ago

This has passed QA on stage

moshthepitt commented 4 years ago

Fixed by #929 and #983