We run a report, but for one of our big clients, it is taking too long. There is a loop where it loops for a list and fetches it upstream 1by1. We're making this a bulk operation now, but some items in the list might be invalid and upstream don't tell us which. I now need to silently handle the failures and remove them from the list and send the request again. I figured the best way to do this is to split the list and try again with a recursive function.
Having looked at the 2 egg problem, I wish to do the same here. I wish to minimize the number of requests to be made. That problem seems to use some quadratic function, I'm not familiar with those things or algorithms. Any help or ideas on how to implement this?