-
Notifications
You must be signed in to change notification settings - Fork 6
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
Performance impact #38
Comments
Hi Ben! Thanks for opening this issue 👍 The performance hit comes from the capability of the code in the space to access not only their own private namespace but also the user namespace, i.e. the notebook namespace. Usually the performance hit isn't noticeable. However, in snippets like the example above it becomes very noticeable as it performs tens of millions of lookups. At the moment I see three options:
I'd love to hear your opinion especially on 2) and 3). Namely:
Thank you in advance for your feedback! 😄 |
Sorry for the long delay. I think that leaving be is fine. For example if you put the code into a function and then define the function in a cell without a That said, I think the documentation should make note of this somewhere, both in terms of the performance hit and the added frames to backtraces. |
I just came across this repository after looking for a solution to this exact problem, very excited! However when I was trying it out every line now goes through
get_ipython().run_cell_magic('space', ...)
. This adds a few layers to every exception backtrace. Not a huge deal. However, this also comes with a pretty severe performance hit. See the following exampleWithout the
%%space <first>
the results areWith
%%space <first>
the results areThe text was updated successfully, but these errors were encountered: