Taking Too long in Execution salesforce

I am trying to integrate workflow with salesforce and Get All leads with limit of 1 (31 records in a page).But it takes too much time in execution. I have total of 713 records so I think it gets all records in front and apply limit on frontend.

So please help in decrease the execution time.

Welcome to the community @robin_singh!

It should actually already work as you described. It applies the limit directly when making the request. Here is the code, you can see it in the line 873