Skip to content

importing laser_polio can take a long time #49

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

Open
jonathanhhb opened this issue Apr 16, 2025 · 1 comment
Open

importing laser_polio can take a long time #49

jonathanhhb opened this issue Apr 16, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jonathanhhb
Copy link
Collaborator

jonathanhhb commented Apr 16, 2025

time python3 -c "import laser_polio"
python3 -c "import laser_polio"  3.63s user 1.19s system 38% cpu 12.545 total

Almost 13 seconds.
I wonder if this is something we can improve.

@jonathanhhb jonathanhhb added the bug Something isn't working label Apr 16, 2025
@clorton
Copy link
Contributor

clorton commented Apr 16, 2025

  _     ._   __/__   _ _  _  _ _/_   Recorded: 13:10:55  Samples:  3960
 /_//_/// /_\ / //_// / //_'/ //     Duration: 5.272     CPU time: 8.644
/   _/                      v5.0.1

Profile at /Users/christopherlorton/projects/laser-polio/import_time.py:4

5.272 <module>  import_time.py:1
└─ 5.271 <module>  laser_polio/__init__.py:1
   ├─ 4.729 <module>  laser_polio/model.py:1
   │  ├─ 3.716 <module>  laser_core/demographics/__init__.py:1
   │  │     [405 frames hidden]  laser_core, numba, llvmlite
   │  ├─ 0.492 <module>  scipy/stats/__init__.py:1
   │  │     [11 frames hidden]  scipy, importlib
   │  ├─ 0.179 <module>  matplotlib/pyplot.py:1
   │  │     [4 frames hidden]  matplotlib
   │  ├─ 0.174 <module>  pandas/__init__.py:1
   │  │     [4 frames hidden]  pandas
   │  ├─ 0.083 <module>  matplotlib/__init__.py:1
   │  │  └─ 0.055 <module>  matplotlib/rcsetup.py:1
   │  └─ 0.060 <module>  sciris/__init__.py:1
   ├─ 0.295 <module>  laser_polio/distributions.py:1
   │  └─ 0.294 <module>  numpy/__init__.py:1
   │        [9 frames hidden]  numpy
   └─ 0.244 <module>  laser_polio/pars.py:1
      └─ 0.244 <module>  laser_core/__init__.py:1
            [14 frames hidden]  laser_core, numba, llvmlite, ctypes, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants