Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.
Hope you enjoy the instance!
Follow the wormhole through a path of communities !webdev@programming.dev
Given we know very little about the problem and runtime constraints, the second approach has the potential to have better performance, as with case 1. the average duration of the requests in a batch is equal to the worst case for all requests, while in case 2. the average duration of all requests is, well, the average.
Ok. But who “we”? Voices in your head?
Aaand… blocked
Aaaaaaaa… blocked
This is to me an question lacking very precise requirements. But you say you need batches, so it sounds like option one (batches) is the only option that satisfies the “batches” requirement.
Then this question isn’t for you.
Nor is the answer for you it would seem.
No, it isn’t
Given you seem to be against adding extra info, based on the other comments, the only correct answer is “whichever one works best for you”.
The answer is quite useless, but I can’t be more specific. “Better” is vague. Faster, smoother, less taxing on system resources, there’s options and they may conflict. Good luck.