| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Awesome! Glad to know there is a way to register these converters more efficiently.
Sorry, something went wrong.
| ), | ||
| ] | ||
| if _import_pandas(required=False): | ||
| if find_spec("pandas"): |
There was a problem hiding this comment.
This is a great trick, thanks!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
While working on #86, I noticed that scyjava was greedily importing pandas, even when it wasn't being used. Pandas is somewhat large and can slow down startup; so it would be nice to delay that until we know we need it.
The traditional pattern of try import just to know whether something is importable can be improved:
this PR removes the _import_X(required=False) pattern in place of importlib.util.find_spec