-
Notifications
You must be signed in to change notification settings - Fork 246
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
Search query takes more time while loading service data #2331
Comments
As the DB size seems 1GB can't attached in here. We will share the credential if further RnD will required. |
Thanks @mahmud6390 for this issue. I have some questions:- |
@MJ1998 First column FHIR core takes times from screen navigation time plus after query execution and UI update. And Second column SDK times means only SDK taking times after calling the query and return the result. |
|
|
@MJ1998 , Here is the Kotlin DSL, please take a look.
We have checked above DSL in latest android-fhir with demo project and the query takes almost 34 seconds to complete. As the database size is above 1.5G, The number of resources currently in the ResourceEntity table is listed below. |
@asad-zaman @mahmud6390 Is there a way for you to provide the test data for us to debug the issue and changes on our side? |
Hello @aditya-07, |
@aditya-07 you can see the performance issue if you tested this in real physical device rather than emulator. |
@mahmud6390 @asad-zaman I am able to use the provided data and replicate the service load time issue on my end. |
Describe the Issue
After integrating latest SDK version 4 with The performance like as below:
with 5000 household, 20100 patient and 19900 services | FHIR core | SDK
login time | 120 - 140 s |
household load time (from side menu) | 5-7 s | 2 s
patient load time (from side menu) | 5-7 s | 2 s
patient pagination | 3-4 s | 3s
patient search time (7 loaded page) | 8-15 s* | 7s
service load time (from side menu) | 60-65 s | 27 s
The search query for service load time for example we want to search ANC status patient
SELECT a.serializedResource FROM ResourceEntity a LEFT JOIN DateIndexEntity b ON a.resourceType = b.resourceType AND a.resourceUuid = b.resourceUuid AND b.index_name = '_lastUpdated' LEFT JOIN DateTimeIndexEntity c ON a.resourceType = c.resourceType AND a.resourceUuid = c.resourceUuid AND c.index_name = '_lastUpdated' WHERE a.resourceType = 'Patient' AND a.resourceUuid IN ( SELECT resourceUuid FROM TokenIndexEntity WHERE resourceType = 'Patient' AND index_name = 'active' AND index_value = 'true' ) AND a.resourceUuid IN ( SELECT resourceUuid FROM ResourceEntity a WHERE a.resourceId IN ( SELECT substr(a.index_value, 9) FROM ReferenceIndexEntity a WHERE a.resourceType = 'Condition' AND a.index_name = 'subject' AND a.resourceUuid IN ( SELECT resourceUuid FROM TokenIndexEntity WHERE resourceType = 'Condition' AND index_name = 'code' AND ( index_value = '77386006' AND IFNULL(index_system, '') = 'http:https://snomed.info/sct' ) ) AND a.resourceUuid IN ( SELECT resourceUuid FROM TokenIndexEntity WHERE resourceType = 'Condition' AND index_name = 'clinical-status' AND ( index_value = 'active' AND IFNULL(index_system, '') = 'http:https://terminology.hl7.org/CodeSystem/condition-clinical' ) ) ) ) ORDER BY b.index_from DESC, c.index_from DESC LIMIT 10 OFFSET 0
Would you like to work on the issue?
The text was updated successfully, but these errors were encountered: