Inbound API Performance Testing

kdurg
Kilo Guru

Hey all,

We are building a series of API endpoints and have ran into a bit of a performance issue and I am not exactly sure where to start looking for answers.

The Setup:
We are using a Scripted REST API to trigger a Subflow that does a few look ups to validate data and then send back some basic data. 

The Issue:
 Each time I hit the endpoint with Postman, I am seeing response times from 9 seconds to 15 seconds. When I look in Flow designer (thinking it was the lookups or case updates), I am seeing runtimes of 200ms-2.5s. 

The Million Dollar Question:
 Where can I look to see where the hang-up is happening? The Scripted REST API is pretty lean and only puts together the inputs for the subflow, then builds the response based on the subflow outputs. No coded loops or anything like that. Where are the other 7-14 seconds disappearing to?

Thanks in advance!

1 ACCEPTED SOLUTION

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

It could be due to Flow Designer generating execution details. You can try using the executeSubflowQuick() or startSubflowQuick() methods in your SRAPI to skip the creation of such execution detail records and realize some performance gain.

More info here.

View solution in original post

2 REPLIES 2

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

It could be due to Flow Designer generating execution details. You can try using the executeSubflowQuick() or startSubflowQuick() methods in your SRAPI to skip the creation of such execution detail records and realize some performance gain.

More info here.

kdurg
Kilo Guru

Thanks, this certainly seemed to have help performance. We are using the Runner API, and the relating function to what you mentioned is .quick(), for reference. I am still curious on how we can see the full breakdown of the time it takes from the request start, until the response is served, but for now, this solution works. Thanks @Laszlo Balla