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

Fed-BioMed module imports takes almost 5s #848

Open
srcansiz opened this issue Sep 5, 2023 · 0 comments
Open

Fed-BioMed module imports takes almost 5s #848

srcansiz opened this issue Sep 5, 2023 · 0 comments
Labels
candidate an individual developer submits a work request to the team (extension proposal, bug, other request)

Comments

@srcansiz
Copy link
Member

srcansiz commented Sep 5, 2023

Launching node components takes more than 5 seconds. Same behavior can be encountered on the researcher notebook while importing classes such as Experiment or request for the first time.

After investing the performance using python profiler, I've realized that it is due to time that is consumed during the module imports. For example, importing modules in node/cli.py module takes almost 5s each time node CLI is called. Since fedbiomed_run executes node.cli at least two times (one for configuration generation second for launching the node ), starting a node almost take 8-9 seconds.

Please see result for the import section in fedbiomed.node.cli:
image

After the first inspection, I realized it is probably due to environ object that is imported almost every module in Fed-BioMed. This can be a bug or an implementation choice depending on the reason behind the time consumed. However, it needs to be investigated and clarified.

@srcansiz srcansiz added the candidate an individual developer submits a work request to the team (extension proposal, bug, other request) label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
candidate an individual developer submits a work request to the team (extension proposal, bug, other request)
Projects
None yet
Development

No branches or pull requests

1 participant