Caching imports

I have a script with a few imports that take 3-4 seconds i.e., very slow. Is there a way to cache imports in memory in between runs so the imports take less time the second time?   (This is a common feature in data science tools to support rapid development.)
0
4 comments

PyCharm has no special features for that. I guess this is what Jupyter Notebook provides and PyCharm supports it https://www.jetbrains.com/help/pycharm/jupyter-notebook-support.html

0
Avatar
Permanently deleted user

Nice!  I haven't seen this before.  However, I tried creating an Altair graph (https://altair-viz.github.io/getting_started/overview.html) and got "No output".  Do you know what's happening?  Is it possible Pycharm+Jypyter only supports matplotlib based graphing for some reason?  If so, it's a deal killer for me.

 

0

Oh, yeah, that library should be supported separately and the developer hasn't implemented it yet https://youtrack.jetbrains.com/issue/PY-35121

Please vote for the ticket to increase its priority.

0
Avatar
Permanently deleted user

Done.  He just needs to implement a `#%% html` marker.  Altair renders to html.

0

Please sign in to leave a comment.