Closed samkanga closed 2 years ago
processClient
method is synchronized
in CoreClientProcessor
class.
and initially when we launch the app the processClient
method is blocked by thread IntentService[SyncClientEventsPerTaskIntentService].
cc: @samkanga
a suggestion here, can we remove synchronized
keyword from the processClient
method so other threads cannot block it.
cc: @ekigamba
@owais-vd we can do that but there could be repercussions. The main question would be, why was the synchronized modifier added in the first place. I have traced it to this commit by @raihan-mpower. It would be a good place to start. cc @samkanga
I agree with @hilpitome.
I'd prefer we leave it as-is, unless there's a better alternative and good reason to remove it given that it relates to synchronizing multiple-threads.
@owais-vd Are there other performance improvements that you can suggest or identified causes for slowness?
Follow this documentation that will help you investigate further and implement previous fixes:
Here is a checklist
Other performance-related discussions for reference and perusal:
cc @samkanga
@samkanga @owais-vd the issue has been resolved. Saving a family now takes less than a minute
APK - Kituoni (Health Facility) Android version 7
Steps to reproduce: a) Click add family b) Fill in the fields c) Click Submit
See attached video
https://user-images.githubusercontent.com/5908630/176893365-b777aa23-bf32-4836-b0c5-1623c0ed27ed.mp4
.