Improve / monitor CLI load time
prisae opened this issue · comments
Dieter Werthmüller commented
CLI load time
The load time of emg3d
is somewhat slow. As the 3D computation is likely to take much longer, it is not that crucial. Yet it is still annoying for a simple, e.g., emg3d --help
or emg3d --version
.
The main culprits are
discretize
, principally the load ofmatplotlib
-> make it lazy loading!xarray
-> check in their issues/PR'snumba
=> This should improve significantly withnumba v0.56.0
numpy
,scipy.special
(not much to do about)h5py
-> make it lazy loading!
ToDo
- Try to bring down load time!
- Add a test monitoring the load time
Relevant links
Snapshots
emg3d v1.7.0
, Date: Fri Jul 22 2022
Dieter Werthmüller commented
Situation improved a lot. With #319, the minimum requirement is now SciPy 1.9, which lazy-loads its module. Load time is down from 2.6 s to 0.3 s: emg3d 1.8.3.dev3, numpy 1.24.4, scipy 1.11.1, numba 0.57.1, discretize 0.10.0, xarray 2023.6.0; most dependencies improved massively: discretize (lazy loading matplotlib), scipy (lazy loading submodules), numba, numpy, xarray.