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.
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