jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.72k stars 4.96k forks source link

SciRuby/iruby, Pry, Tab Completion with >1000 items fast on console, slow on notebook #2136

Open LunarLanding opened 7 years ago

LunarLanding commented 7 years ago

Hi. I am trying to setup auto completion for this particular combination: SciRuby/iruby with Pry. This results in autocompletions returning a list of >1000 suggestions in some situations. This list is useless because of it's size. However the ipython console seems to handle it instantaneously, while the notebook freezes for some seconds. This makes it a little annoying to use since it leads to accidental hang ups. I'm going to try and find a way to restrict what the iruby kernel returns. If someone could point me to the appropriate code I could also try to prevent these situations.

takluyver commented 7 years ago

Thanks @LunarLanding . I think this is the notebook frontend code that handles completions:

https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/js/completer.js