medic / care-teams

For Product Management
0 stars 0 forks source link

contact_detail apdex: research and development cycle 3 #99

Closed michaelkohn closed 2 months ago

michaelkohn commented 2 months ago

R&D cycle 1 R&D cycle 2

One week time-box to do all of the following 👇 (1-4) as many times as necessary to get to 0.94. ))

If 0.94 not achieved in 1 week, we will evaluate at the end of the week if we want to allocate an additional 1 week time-box for more work.

latin-panda commented 2 months ago

A possible improvement is to avoid a double call to the DB when retrieving contact docs that are used by the rules engine to return tasks. Because the rules engine is delicate to modify, I have asked Diana's opinion.

There is a micro improvement to avoid looping twice a list of tasks, but it is likely not noticeable by the user. This one can go with the other tiny improvements I mentioned before. I'm leaving all these tiny improvements last as they have little impact.

The lineage model generator is called multiple times resulting with the same outcome of data, I'm still debugging if that makes sense or if we need to fix it.

latin-panda commented 2 months ago

The lineage model generator is called multiple times in different places:

Most of these are when reloading the page or the startup of the app

Edit: Nothing to improve in lineage model generator when called with hydration = true

latin-panda commented 2 months ago

The small improvements mentioned before are developed here.

The bigger one is still waiting for Diana's input. And prob I'll do it next week as separate PR.

latin-panda commented 2 months ago

PR are is open and ready for review, but I haven't measure the performance improvement. Moving this to next week.

latin-panda commented 2 months ago

Take this performance result with a grain of salt; these are done manually using my Nokia phone and my local environment. I tried to keep the phone's memory load the same in both cases, but it's hard, especially with these few repetitions (about 15)

I made some small improvements, and it seems we got a tiny improvement.

Screenshot 2024-04-26 at 6 00 06 PM Screenshot 2024-04-26 at 5 59 02 PM Screenshot 2024-04-26 at 5 59 39 PM