Skip to content

Conversation

@superskip
Copy link
Contributor

@superskip superskip commented Jun 5, 2025

DHIS2-19724

Of the six requests to the trackedEntities endpoint I have removed one (in autoSwitchOrgUnitEpic) 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.

@superskip superskip requested a review from a team as a code owner June 5, 2025 12:51
@superskip
Copy link
Contributor Author

When navigating from the TEI working list to the enrollment dashboard there is a duplicate request made by useEnrollment in the enrollement widget. Looks like something to fix in this pull request.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 6, 2025

Copy link
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@superskip superskip changed the title perf: [DHIS2-19724] optimize api-calls in enrollment dashboard perf: [DHIS2-19724] optimize api-calls on enrollment dashboard Aug 15, 2025
@github-actions
Copy link

github-actions bot commented Sep 8, 2025

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 9, 2025

@superskip superskip added testing and removed testing labels Sep 10, 2025
@superskip superskip merged commit 955556b into master Oct 14, 2025
40 of 41 checks passed
@superskip superskip deleted the DHIS2-19724 branch October 14, 2025 14:00
dhis2-bot added a commit that referenced this pull request Oct 14, 2025
## [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))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 104.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants