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

Module imports should eventually be lazy #50

Open
DanielRJohnson opened this issue Jul 5, 2023 · 0 comments
Open

Module imports should eventually be lazy #50

DanielRJohnson opened this issue Jul 5, 2023 · 0 comments

Comments

@DanielRJohnson
Copy link
Collaborator

Right now, every plugin and every driver is imported and loaded into memory in Terminal.__init__. This may become a problem down the road. It's hard to imagine a time where someone could run out of memory since there are only so many forms of data products and data storage types, but it could slow down Terminal.__init__ by having to import and load hundreds of modules. A better practice would be to use lazy module importing and defer loading the module into memory until we know it's actually being used.

Here's some Python documentation I found on it:
https://docs.python.org/3/library/importlib.html#implementing-lazy-imports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant