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

[External API][Performance] Make retrieving catchment optional #718

Closed
Tracked by #1569
vinayvenu opened this issue Apr 18, 2024 · 2 comments
Closed
Tracked by #1569

[External API][Performance] Make retrieving catchment optional #718

vinayvenu opened this issue Apr 18, 2024 · 2 comments
Assignees

Comments

@vinayvenu
Copy link
Member

GET /api/subject/#id takes up about 16% of the resources on the common cloud, and is slow (median response time 3.3 seconds). More than 90% of the time and resources are taken up because we are trying to retrieve all catchments the subject belongs to. Making this configurable can make the API at least 10 times more efficient. Overall improvement in Avni performance will be is around 14%.

Acceptance criteria

  • Add a parameter "includeCatchments" (values true, false) to the GET api/subject/#id api.
  • By default, do not fetch the "catchments" field if this is not set to true
image image
@github-project-automation github-project-automation bot moved this to New Issues in Avni Product Apr 18, 2024
@vinayvenu vinayvenu moved this from New Issues to Analysis Complete in Avni Product Apr 18, 2024
@mahalakshme mahalakshme moved this from Analysis Complete to Ready in Avni Product Apr 18, 2024
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Apr 22, 2024
@petmongrels petmongrels self-assigned this Apr 22, 2024
@petmongrels
Copy link
Contributor

Introducing a breaking/forcing change by making the includeCatchments = false. So that only people who require catchment pass it explicitly. Making it true will mean we not get performance benefit unless people make change.

@vinayvenu
Copy link
Member Author

Context, as far as we know catchments are used only for the Bahmni HWC integration. Not sure if it is still being used after the pilot.

petmongrels added a commit that referenced this issue Apr 22, 2024
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Apr 22, 2024
@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Apr 24, 2024
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Apr 24, 2024
@vinayvenu vinayvenu moved this from QA Ready to In QA in Avni Product May 3, 2024
@vinayvenu vinayvenu moved this from In QA to Done in Avni Product May 3, 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

2 participants