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

AMM-514 : 1097- Moving back to previous page take more time #61

Merged
merged 2 commits into from
Jul 29, 2024

Conversation

ravishanigarapu
Copy link
Contributor

@ravishanigarapu ravishanigarapu commented Jul 25, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Type of change

  • Bug fix
  • New feature
  • Enhancement
  • Refactoring
  • Documentation
  • Other ( please specify )

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@devikasuresh20
Copy link
Contributor

@ravishanigarapu Pls add Jira ticket Id also in PR Title.

@indraniBan indraniBan changed the title Optimise DB calls AMM-514 : 1097- Moving back to previous page take more time Jul 25, 2024
@ravishanigarapu
Copy link
Contributor Author

ravishanigarapu commented Jul 25, 2024

Done

@ravishanigarapu ravishanigarapu changed the title AMM-514 : 1097- Moving back to previous page take more time AMM-514 : 1097- Moving back to previous page take more time Jul 25, 2024
Copy link

sonarcloud bot commented Jul 25, 2024

Copy link
Contributor

@devikasuresh20 devikasuresh20 left a comment

Choose a reason for hiding this comment

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

looks fine.

@@ -573,7 +573,8 @@ public List<BeneficiariesDTO> searhBeneficiaryByGovIdentity(String identity)
}

private MBeneficiarymapping getBeneficiariesDTONew(Object[] benMapArr) {
MBeneficiarymapping benMapOBJ = new MBeneficiarymapping();
MBeneficiarymapping benMapOBJ = mappingRepo.getMapping(getBigIntegerValueFromObject(benMapArr[9]),
Copy link
Contributor

Choose a reason for hiding this comment

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

@ravishanigarapu Pls add null checks for benMapArr for ensuring safe type casting.

@drtechie
Copy link
Member

Hi @ravishanigarapu

Can you explain how this one query fixes the delay in API response?
Also, some lines have been removed. What about them?

@ravishanigarapu
Copy link
Contributor Author

Hi @drtechie , Previously they were running multiple DB queries over a loop which is resulting in delay of API response(for example, if a phone number has 10 records then loop is running for each phone number for all 9 DB queries. which total results of 90 DB calls) . Now i have removed multiple queries and added a single query which does the work of those multiple queries. Hence only A single DB query is called for each phone number which reduces the api call time.

@drtechie
Copy link
Member

Thanks @ravishanigarapu

@ravishanigarapu ravishanigarapu merged commit 37c25c4 into PSMRI:develop Jul 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants