You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There a a couple places where yt depends on pkg_resources, which is notorious for having a large import overhead.
We've been mitigating this by moving such imports statements where they are actually used instead of at module level so it doesn't currently impact yt's own import time, but there are alternatives (importlib.metadata, importlib.resources) in the standard library that may be worth exploring.
The text was updated successfully, but these errors were encountered:
yt.utilities.command_line.py (commands yt version and update)
yt.load_sample (via yt.sample_data.api.get_data_registry_table and yt.sample_data.api._get_pooch_instance)
The latter cases are indeed where we locate data files from the package (most likely this can be done with importlib.resources), and the first two are just about obtaining version numbers which should be doable with importlib.metadata.
There a a couple places where yt depends on
pkg_resources
, which is notorious for having a large import overhead.We've been mitigating this by moving such imports statements where they are actually used instead of at module level so it doesn't currently impact yt's own import time, but there are alternatives (
importlib.metadata
,importlib.resources
) in the standard library that may be worth exploring.The text was updated successfully, but these errors were encountered: