emsig / emg3d

A multigrid solver for 3D electromagnetic diffusion

Home Page:https://emg3d.emsig.xyz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve / monitor CLI load time

prisae opened this issue · comments

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 of matplotlib -> make it lazy loading!
  • xarray -> check in their issues/PR's
  • numba => This should improve significantly with numba 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

2022-07-22-01

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.

Selection_001