Skip to content

Conversation

@hamza221
Copy link
Contributor

@hamza221 hamza221 commented Oct 20, 2025

fix #11746

@hamza221 hamza221 self-assigned this Oct 20, 2025
@hamza221 hamza221 changed the title perf(quick-actions): eliminate dublicate api calld for each envelope perf(quick-actions): eliminate duplicate api calls for each envelope Oct 21, 2025
@hamza221 hamza221 marked this pull request as ready for review October 21, 2025 17:43
@hamza221
Copy link
Contributor Author

Ci needs some tweaking

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
…velope

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
Comment on lines 43 to 45
$actions = $this->actionsMapper->findAll($userId);
foreach ($actions as $action) {
$actionSteps = $this->actionStepMapper->findAllStepsForOneAction($action->getId(), $userId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perf: n+1 problem

you could fetch the steps in bulk with a WHERE action_id IN (...)

…velope

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
…velope

Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loading quick action steps triggers one xhr request per message/envelope

3 participants