Skip to content
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

Deferred imports #229

Open
dgkuester opened this issue Oct 23, 2024 · 0 comments
Open

Deferred imports #229

dgkuester opened this issue Oct 23, 2024 · 0 comments
Labels
feature New feature or request

Comments

@dgkuester
Copy link

dgkuester commented Oct 23, 2024

Thanks for the nice library! I have a module that implements a number of dataclasses based on xarray-dataclasses that I wanted to import quickly.

In order to accomplish this, I have a fork that implements lazy loading of numpy and xarray along these lines. To give you a rough sense for the resulting speedup, the initial import time drops from ~320 ms down to ~50 ms on my M2 macbook pro in python 3.9.

Do you think you may be interested in considering integrating this upstream? If so, I'd be happy to open a PR.

@astropenguin astropenguin added the feature New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants