Skip to content
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

MRU list for server connections is now super slow with kernel work #2533

Closed
IanMatthewHuff opened this issue Dec 17, 2019 · 8 comments
Closed
Assignees

Comments

@IanMatthewHuff
Copy link
Member

One basic scenario to demo this:

  1. Start up JupyterServer A from CPU A
  2. From VSCode on CPU B connect to JupyterServer A
  3. Close down the connection in VSCode on CPU B
  4. Close down JupyterServer A on CPU A
  5. Start up a new JupyterServer B on CPU A
  6. Open up the "Select Remote or Local" dialog on VSCode in CPU B

In this scenario the only difference between servers A and B is the token. As such, when trying to populate the MRU list it's going to try sending lots of kernel API requests with the old A token to the new B server. In the command windows for the jupyter server on CPU B you can see all the 403 forbidden requests for this. In this scenario for me opening up the "Remote or Local" command and actually seeing the selection box takes over 30 seconds with no progress shown.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Dec 17, 2019

Do we even need to check if the url is alive (reachable)?
Why not do it in the background and return what even information has completed?

Unsure how kernel work world have impacted this, as it's unrelated.

@IanMatthewHuff
Copy link
Member Author

Honestly, right now I'm having trouble replicating the really bad perf. Now it's only a 4-5 second wait, which might be acceptable. But getRunningServerDetails is getting called for every server in the list many of which might be remote. And it's going to call Kernel.listRunning on everything in there. Seems like this would always have the possibility of hitting bad cases. Can we change the pick items after we've submitted them? If not I don't think any degree of hitting servers and querying kernels would be acceptable personally.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 18, 2019

We should have a way to tell if it's running or not though? Wouldn't that be useful to the user?

@DonJayamanne
Copy link
Contributor

Should we add telemetry to see how long it takes to popup this list in the wild?

@rchiodo
Copy link
Contributor

rchiodo commented Dec 18, 2019

Yeah I think so.

@DonJayamanne
Copy link
Contributor

We already do. SelectJupyterURI

@IanMatthewHuff
Copy link
Member Author

From discussion. We don't want to hit a server at all to pop up a MRU list. Proposed plan.

Save a list of X (5? 10?) servers in global VS Code cache. With each save the last time that we were connected to it. Display the name and the last time we connected to it in the MRU list.

@IanMatthewHuff IanMatthewHuff self-assigned this Dec 18, 2019
@DonJayamanne
Copy link
Contributor

Validated

@lock lock bot locked as resolved and limited conversation to collaborators Jan 6, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 14, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants