Back-end (server action) performance profiling

This is an intermediate-advanced feature - you can skip this topic if you’re a beginner

I just had a situation where in a NodeJS project I added an API Action step somewhere in a Library file and a few server actions became slow because they relied on the API Action step that was included as part of an Exec step.

If I hadn’t remembered about this, I’d be left wondering why the server actions were slow, with no apparent way of performance profiling.

I suggest the addition of an option (much like the “debug” option), where when toggled, it outputs in the JSON response a tree containing all steps and their execution time

e.g.:

Database Query: query
Set Value name = {{query[0].name}}
{
    "query": (...),
    "name": "George",
    "_profiling": {
       "database_query:query": "32ms",
       "set_value:name": "0.1ms"
    }
}

This would allow easy identification of performance bottlenecks. Haven’t thought how to deal with nested steps and repeat loops, but this topic serves as an introduction to the concept

Community Page
Last updated: