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

Serialize CompositeAnalysis execution #1425

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wshanks
Copy link
Contributor

@wshanks wshanks commented Mar 19, 2024

CompositeAnalysis was calling run() on each subcomponent, which starts a new thread for each one, and then waiting on all of them to finish. Because of the way Python executes threads only one thread executes Python code at a time and there is not much performance benefit to starting all the threads at once. Here, the code is changed to wait for each subcomponent's run() to complete before starting the next one. Executing sequentially like this avoids starting an uncontrolled numbers of threads simultaneously.

This is a temporary mitigation and a wider refactor should be done to handle analysis execution better.

CompositeAnalysis was calling run() on each subcomponent, which starts a
new thread for each one, and then waiting on all of them to finish.
Because of the way Python executes threads only one thread executes
Python code at a time and there is not much performance benefit to
starting all the threads at once. Here, the code is changed to wait for
each subcomponent's run() to complete before starting the next one.
Executing sequentially like this avoids starting an uncontrolled numbers
of threads simultaneously.

This is a temporary mitigation and a wider refactor should be done to
handle analysis execution better.
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 this pull request may close these issues.

None yet

1 participant