`import sgkit` takes ~1.5s
See original GitHub issueFor tools using the CLI this amount of delay feels excessive. Around 1s of this time is performing imports. Here’s the import flame graph:
(0.1s on xarray.tutorial
?!?)
I assume some of these could be imported only when they are needed - although given that many of the imports are referenced in typing specifications that might not be possible.
I’m not sure yet what the remaining 0.5s is - a cProfile callgraph is pretty useless on import but I think there is a way around that by profiling the individual sgkit files.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Long import time · Issue #6726 · pydata/xarray - GitHub
Importing the xarray package takes a significant amount of time. For instance: ❯ time python -c "import ... import sgkit takes ~1.5s pystatgen/sgkit#931....
Read more >sgkit - bytemeta
sgkit repo issues. ... `gwas_tutorial.ipynb` taking too long to run. benjeffery. benjeffery OPEN · Updated 2 days ago · `import sgkit` takes ~1.5s....
Read more >sgkit - githubmemory
sgkit repo issues. ... `gwas_tutorial.ipynb` taking too long to run. benjeffery. benjeffery OPEN · Updated 2 weeks ago · `import sgkit` takes ~1.5s....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also see https://github.com/pydata/xarray/issues/6726, seems they are aware of the issue.
Pandas is not used very much in the codebase, so it might be possible to import it lazily.
Similarly, the distance API is pretty niche so making that lazier would be good too.