android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Patient card takes long time to load Patient details

Open PallaviGanorkar opened this issue 2 years ago • 2 comments

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:

  1. Lauch app have 4700+ resources (Patients)
  2. Select any Patients
  3. 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.

PallaviGanorkar avatar May 18 '22 04:05 PallaviGanorkar

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

PallaviGanorkar avatar Jun 07 '22 09:06 PallaviGanorkar

  1. db.withTransaction statement in DatabaseImpl take around 2min which means its taking time to get the lock
  2. I have tried by removing DB transaction, but still select query takes time around 2min

PallaviGanorkar avatar Jun 07 '22 09:06 PallaviGanorkar