47
Views
8
Comments
Solved
Performance warning from server actions

Hello,

I have a few performance warning involving server actions. Specifically, because it calls several server actions in one. The warning says to group them up and call it instead. So I am wondering: Does this performance issue only happen when i trigger the server action, or does it impact the performance regardless. Thank you!

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

The problem with calling multiple.server actions from one client acrion is, thst each call is basically a rest web service call over the network from.thr computer where your app runs to the sever where your server action is executed. Limiting this to one server call will always improve performance. Therefore you should group all server actions in a client action into one.

2024-12-02 13-16-47
Vipin Yadav

Hi @Low Nico,

In OutSystems best practices, within a client action, you should only call one server action. However, in a server action, you can call multiple server actions.

It’s possible that in your case, multiple server actions are being called within a client action. Could you please share some screenshots for reference so I can review and provide feedback?

Thanks,

Vipin Yadav

UserImage.jpg
Low Nico

Hi Vipin,

Thank you for your reply, I am indeed calling a few server actions within a client action. I would like to know if this causes a performance issue only when I run the client action, or does it impact the performance regardless. Thank you!

2024-12-02 13-16-47
Vipin Yadav

Hi Low Nico, 

I have added the link to the OutSystems document below, which will be helpful for you 

Multiple server requests (Aggregates or Actions) inside Client Actions

Thanks,

Vipin Yadav

2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP
Solution

The problem with calling multiple.server actions from one client acrion is, thst each call is basically a rest web service call over the network from.thr computer where your app runs to the sever where your server action is executed. Limiting this to one server call will always improve performance. Therefore you should group all server actions in a client action into one.

UserImage.jpg
Low Nico

Yup I understand the benefits of grouping it into one server action. So according to your explanation, can I assume that the performance issue only occurs when i trigger the client action? Thank you!

2024-12-18 16-06-42
Junaid Syed

Hi Low,

The kind of performance warning you described is reported as a result of code analysis against predefined code patterns. It has also been discussed above that grouping the server actions will help you to get rid of it and how.

However, even after grouping the server actions, you might still have the logic in the server actions which may cause performance issues, therefore just grouping of the server actions won't fix that problem.

Hope it answers your question!

Junaid

2021-09-06 15-09-53
Dorine Boudry
 
MVP

When your server actions perform updates on your database, you also have to consider transactionality : it is limited to within each separate server call. 

So you have to consider if you wouldn't possibly end up with data inconsistencies if you have separate server calls from your client to do a piece of work.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.