-
Notifications
You must be signed in to change notification settings - Fork 35
perf: [DHIS2-19724] optimize api-calls on enrollment dashboard #4132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
When navigating from the TEI working list to the enrollment dashboard there is a duplicate request made by |
|
src/core_modules/capture-core/components/WidgetEnrollment/hooks/useTrackedEntities.js
Show resolved
Hide resolved
simonadomnisoru
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
🚀 Deployed on https://deploy-preview-4132.capture.netlify.dhis2.org |
|
## [104.1.2](v104.1.1...v104.1.2) (2025-10-14) ### Performance Improvements * [DHIS2-19724] optimize api-calls on enrollment dashboard ([#4132](#4132)) ([955556b](955556b))
|
🎉 This PR is included in version 104.1.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |



DHIS2-19724
Of the six requests to the
trackedEntitiesendpoint I have removed one (inautoSwitchOrgUnitEpic) and limited the amount of requested data in three.Two of the remaining five requests come from the enrollment widget and the profile widget and can't be removed.
Another two happens during initialization of the enrollment dashboard (one for fetching the tracked entity and one for fetching enrollments). They are done separately for error reporting purposes; the tracked entity request checks if the TE exists, while the enrollment request checks if the user has access to a given program.
The last request comes from
useCommonEnrollmentDomainData, which caches a single enrollment for shared use across all sub-pages of the enrollment dashboard. This might still be a potential candidate for optimization.