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

Smarter batching #228

Open
adamchalmers opened this issue Mar 16, 2024 · 0 comments
Open

Smarter batching #228

adamchalmers opened this issue Mar 16, 2024 · 0 comments

Comments

@adamchalmers
Copy link
Collaborator

adamchalmers commented Mar 16, 2024

Right now, the batching algorithm is

  • If an API request's output address is None, add it to a queue
  • Run this queue in a batch (i.e. flush it):
    • Just before running an API request whose output address is Some is run
    • At the end of the program

But we can enhance this and batch a bit more.

We could still batch API requests whose output is written to an address (i.e. add them to the batch queue instead of executing them). We'd just have to add them to the current batch, and then flush it. That way the output address is still written to at the right time.

This would require modifying the batch queue. Currently it assumes all API responses get discarded. It'll need to instead track which API requests should be written where.

adamchalmers added a commit that referenced this issue Mar 17, 2024
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

Successfully merging a pull request may close this issue.

1 participant