Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Break and stop the pagination if we have the results #152
I would like to suggest the following optimization. Right now the while loop will continue to fetch results while we already have the max results. For example, will become very inefficient when you're looking if a directory exists, and it will fetch all the pages.
This caused our cluster to do 10th of thousands of requests per second, which became quite expensive.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
Once you've signed (or fixed any issues), please reply here (e.g.
What to do if you already signed the CLA