android-fhir
android-fhir copied to clipboard
Patient card takes long time to load Patient details
Describe the bug Local sever has 4752 patients. it takes time to load patient list, then select any patient from list. Patient card page is displayed but here card is empty, it takes around 2min to load the details.
Component Core library, SDC library, reference app
To Reproduce Steps to reproduce the behavior:
- Lauch app have 4700+ resources (Patients)
- Select any Patients
- See behavior: Empty card is displayed around 2min and then details are loaded.
Expected behavior Patient card should take this long time to load the details. In case if its taking then app must show progress bar here.
Screenshots If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
- Device: Nokia 3.4
- Android version: 11
- Build number: 00WW_2_410_SP02
Additional context Add any other context about the problem here.
Would you like to work on the issue? Please state if this issue should be assigned to you or who you think could help to solve this issue.
Here are some finding,
Screnario | non-encrypted-DB | Encrypted-DB |
---|---|---|
after first time app launch open Patient card | within 1sec | within 1sec |
senconde time onwards | ~20sec | `2min |
app is idle for long time then select patient to open Patient Card | within 1sec | within 1sec |
- db.withTransaction statement in DatabaseImpl take around 2min which means its taking time to get the lock
- I have tried by removing DB transaction, but still select query takes time around 2min