adriangb / di

Pythonic dependency injection
https://www.adriangb.com/di/
MIT License
301 stars 13 forks source link

perf: collapse tasks #33

Closed adriangb closed 2 years ago

adriangb commented 3 years ago

Given a sequence of single tasks (sync or async), we can collapse them into a single task since they can't be executed in parallel. This will especially be nice for sync tasks so that an entire sequence of tasks can be pushed to a thread (vs. pushing many small tasks)

adriangb commented 2 years ago

Given the current architecture, this does not seem feasible 😕