saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Setting total pages before initiating pool with async pagination

Open MatthewLoffredo opened this issue 1 year ago • 0 comments

I have a specific edge case I'm trying to address:

Let's say I'm accessing an api that is somewhat slow with all the parameters I'm providing. But there's a way to speed it up, by asking it to return reduced information. What I want to do is to be able to make a fast request first, get the total pages, and then apply async pagination to get all the items at once from each page.

When I do this now, the pagination plugin still has to wait for the first request to finish to get the total pages. So if the first request is long, then the time it takes to get the rest of the pages will increase. Is there a way to use a faster request to get the total pages, and then use that total on initiating the pagination, so it can get all the pages at once (instead of waiting for the first request to finish)?

MatthewLoffredo avatar Oct 07 '24 20:10 MatthewLoffredo