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

A way to turn off parallel execution (for easier comparison) #6

Closed
simonw opened this issue Apr 15, 2022 · 2 comments
Closed

A way to turn off parallel execution (for easier comparison) #6

simonw opened this issue Apr 15, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Apr 15, 2022

Would be neat if you could toggle the parallel execution on and off, to better demonstrate the performance difference that it implements.

Would happen in this code that calls gather():

awaitables = [
instance._registry[name](
instance,
_results=results,
**{k: v for k, v in results.items() if k in instance._graph[name]},
)
for name in awaitable_names
]
awaitable_results = await asyncio.gather(*awaitables)
results.update(dict(zip(awaitable_names, awaitable_results)))

@simonw simonw added the enhancement New feature or request label Apr 15, 2022
simonw added a commit that referenced this issue Apr 15, 2022
Major rewrite of functionality. This will break anything that uses this library!

* Use functions instead of class methods, closes #8
* Also includes parallel= mechanism from #6
@simonw
Copy link
Owner Author

simonw commented Apr 15, 2022

Implemented most of this in #9 - but it needs tests and documentation.

@simonw
Copy link
Owner Author

simonw commented Apr 15, 2022

Will be easier to write tests for this if I solve #7 first.

@simonw simonw closed this as completed in edf8387 Apr 16, 2022
simonw added a commit that referenced this issue Apr 16, 2022
Refs #6, #7, #8, #9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant