Improve loading time of xtgeo
- Dominant language
- Python
- Stars
- 122
- Forks
- 67
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 19
Description
The loading of xtgeo takes too long time and `matplotlib`, `scipy` and `pandas` may be major drivers for this.
By enabling `export XTG_DEBUG_DEV=1`, an example from an RGS (Equinor) machine here:
```
>>> import xtgeo
(0.000) XTGEO __init__ ...
(1.107) Import matplotlib etc...
(1.107) Import matplotlib etc...DONE
(1.496) Import common... done
(1.496) Import various XTGeo modules...
(3.577) Import various XTGeo modules... wells...
(5.926) Import various XTGeo modules... surface...
(5.996) Import various XTGeo modules... cube...
(5.996) Import various XTGeo modules... 3D grids...
(6.002) Import various XTGeo modules... xyz...
(6.002) Import various XTGeo modules... plots...
(6.002) Import various XTGeo modules...DONE
(6.002) Import various XTGeo wrappers...
(6.003) XTGEO __init__ done
```
Should check if a more lazy loading is possible. For `matplotlib`, one laso need to evaluate the environment for plotter backend; see curent `__init__` file.
Contributor guide
Research direction
Start by reading the current __init__ file and running the import trace with XTG_DEBUG_DEV=1 to identify the slow imports. Investigate whether lazy loading is possible, including evaluation of the matplotlib plotter backend; done means import time is reduced without breaking the affected loading and plotting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matplotlib, pandas, python
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100