-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Limit number of completions returned #10743
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
Conversation
|
JupyterLab May not like that as (IIRC) they use client-side completion filtering for as-you type. returning only the fist 500 may be having undesirable side effects. |
|
Is it clear where it has difficulty? If it's in the display and not the message, maybe this filtering should be done client-side rather than kernel-side. If it's in the transfer/serialization of the message itself, then doing it in the kernel makes sense. |
|
I didn't investigate that, but the issue was about 70k files appearing as completions. If it takes 15 characters for each completion, that's sending over 1MB of data. Even if the main slowdown is from display when it's local, if you're accessing a remote server over a low-bandwidth connection, that's a lot of data to be transferring when you hit tab. |
|
Makes sense, thanks |
|
Do we want this backported to 5.x? |
want ? Not really. Maybe we should for consistency though. |
|
I'm inclined to think we should. @meeseeksdev backport |
|
There seem to be a conflict, please backport manually |
Merge pull request ipython#10743 from takluyver/limit-no-completions Limit number of completions returned
If there are a very large number of completions (e.g. tens of thousands of files), the notebook frontend can have trouble handling them - see jupyter/help#198 . I don't see any practical need for so many completions in the UI - if there are that many, you're likely to type some more letters and try completing again.
This limits the returned completions to 500. It's not configurable, but there's a clear constant so someone could patch it locally if there was an unexpected need for a larger number of completions.