Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting total pages before initiating pool with async pagination #461

Open
MatthewLoffredo opened this issue Oct 7, 2024 · 0 comments
Open

Comments

@MatthewLoffredo
Copy link

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)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant