Skip to content

Conversation

@takluyver
Copy link
Member

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.

@Carreau
Copy link
Member

Carreau commented Aug 15, 2017

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.

@minrk
Copy link
Member

minrk commented Aug 16, 2017

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.

@takluyver
Copy link
Member Author

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.

@minrk
Copy link
Member

minrk commented Aug 18, 2017

Makes sense, thanks

@minrk minrk merged commit 03bb4e4 into ipython:master Aug 18, 2017
@takluyver
Copy link
Member Author

Do we want this backported to 5.x?

@Carreau
Copy link
Member

Carreau commented Aug 18, 2017

Do we want this backported to 5.x?

want ? Not really. Maybe we should for consistency though.

@takluyver takluyver added this to the 5.5 milestone Aug 18, 2017
@takluyver
Copy link
Member Author

I'm inclined to think we should.

@meeseeksdev backport

@lumberbot-app
Copy link
Contributor

lumberbot-app bot commented Aug 18, 2017

There seem to be a conflict, please backport manually

@lumberbot-app lumberbot-app bot added the Still Needs Manual Backport Added My MrMeeseeks when a backport fails. Help by backporting it, solving conflicts, send PR. label Aug 18, 2017
Carreau pushed a commit to Carreau/ipython that referenced this pull request Sep 13, 2017
Merge pull request ipython#10743 from takluyver/limit-no-completions

Limit number of completions returned
@Carreau Carreau removed the Still Needs Manual Backport Added My MrMeeseeks when a backport fails. Help by backporting it, solving conflicts, send PR. label Aug 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants