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

import timing #6370

Closed
mih opened this issue Jan 25, 2022 · 0 comments · Fixed by #6378
Closed

import timing #6370

mih opened this issue Jan 25, 2022 · 0 comments · Fixed by #6378
Labels
performance Improve performance of an existing feature

Comments

@mih
Copy link
Member

mih commented Jan 25, 2022

For things like the CLI fast startup times are important, but also our trajectory to more parallelization puts more and more weight on this. At the moment a plain import datalad takes roughly ~200ms. Here are some stats on the timing of the underlying imports on my system (indentation indicates nesting of imports):

import time: self [us] | cumulative | imported package
...
import time:     29374 |      62753 | site
...
import time:      3070 |      10495 |                   datalad.support.exceptions
import time:      1218 |      13583 |                 datalad.dochelpers
...
import time:      2706 |      21275 |                 datalad.utils
import time:       633 |      35489 |               datalad.runner.utils
import time:       544 |      87447 |             datalad.runner.protocol
import time:      2809 |      90256 |           datalad.runner.coreprotocols
...
import time:        66 |      94285 |       datalad.runner.gitrunner
import time:       715 |      94999 |     datalad.consts
...
import time:      2531 |     122479 |   datalad.config
...
import time:      2222 |      36829 |   datalad.log
import time:     63481 |     232323 | datalad

So half of it is initializing the config.

It would make sense to explore the newly established possibilities with the DATALAD_RUNTIME_LIBRARYMODE flag.

@mih mih added the performance Improve performance of an existing feature label Jan 25, 2022
@mih mih mentioned this issue Jan 29, 2022
7 tasks
@mih mih closed this as completed in #6378 Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Improve performance of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant