Skip to content
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

[DEA] Reduce the loading time of the subject profile page #1259

Closed
Tracked by #1621
mahalakshme opened this issue Jun 18, 2024 · 0 comments
Closed
Tracked by #1621

[DEA] Reduce the loading time of the subject profile page #1259

mahalakshme opened this issue Jun 18, 2024 · 0 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Jun 18, 2024

Need:

When clicked on a subject enrolled in a program, it takes an around 3-10 secs to finish loading the page which affects the user experience.

Image

AC:

  • Reduce the loading of subject profile page(that appears on clicking a subject from search results) independent of the below to less than 2 secs
    • enrolled in program or not
    • with or without completed visits
    • with or without programEligibilityCheckRule or encounterEligibilityCheckRule
    • with or without msgsSent or msgsScheduled
  • Many calls(/msgs, /msgsNotYetSent, /programSummaryRule, etc) are made when clicking on a subject(enrolled in a program). Instead do them only when needed or do all without making the screen blocking so that it provides a better user experience when expand icon for something like say programSummaryRule is clicked. Developer can decide.
  • Some calls made multiple times. Eg: /programSummaryRule for the same program enrolment loading more than once, calls to /organisationConfig - 3 times. This can also be fixed.

Old: Ignore

Technical Examples:

  • /msgs and /msgsNotYetSent need to load only on clicking on expand icon on the profile tab
  • /web/subjectProfile?uuid={UUID} looks like also is needed only when clicking on the profile tab or can be split since we fetch things like profilePicture here
  • programSummaryRule for the same program enrolment loading more than once - The call can go only when the user opens the ProgramSummary expand icon
  • Do /web/forms/formUuid once only when expand icon on Enrolment details is clicked
  • /eligibleProgramEncounters and /eligibleGeneralEncounters calls can be made when clicking on 'New Form'. New form can be displayed even if only one encounter present.
  • /web/subject/{uuid}/encounters/ called on clicking an individual enrolled in a program, doesn't seem to be used anywhere within or outside of the programs tab.
  • calls to /organisationConfig 3 times(on clicking an individual enrolled in a program) can be avoided if managed state better
  • So any other API calls made unnecessarily similar to the above:
    1. So make calls only when expand icon is clicked
    2. only for whatever is needed to render the tab/contents user is going to view

Inputs:

split
subject Profule - too much time
take it from user level
calls can be still made

@mahalakshme mahalakshme changed the title [DEA] Optimize the APIs on subject profile [DEA] Reduce the loading time of the subject profile page Jul 4, 2024
@1t5j0y 1t5j0y self-assigned this Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants