Requisition batch approve approveAll takes longer than 30s

Description

Batch approve approveAll currently is taking around 90-120 seconds (using 3G slow and 6x cpu throttle), with almost all of that time occurring on the server side (network transfer time is negligible).

Team ILL measured the time using the Malawi dataset with user "dhitale", Essential Meds program, Lilongwe DHO Pharmacy (267 FS products). Each approval seems to take about 5-10 seconds, and a significant portion seems to be in building a stock event and submitting it to stock management.

Acceptance Criteria

  • Refactor that logic to improve the API response to < 500ms (Demonstrated on Malawi's dataset, dhitale user, Essential Meds program; pass this ticket to or for QA)

Environment

None

Status

Assignee

Paweł Albecki

Reporter

Chongsun Ahn

Labels

Story Points

5

Time tracking

56h

Epic Link

Components

Sprint

None

Fix versions

Priority

Critical