question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

python.datascience.execSelectionInteractive is very slow compared to python.datascience.runcurrentcell

See original GitHub issue

Bug: python.datascience.execSelectionInteractive is very slow compared to python.datascience.runcurrentcell

Steps to cause the bug to occur

  1. Assign python.datascience.execSelectionInteractive to unique keybinding without when expression to rule out keybinding slowness
  2. Assign python.datascience.runcurrentcell to keybinding
  3. Compare the response time of two different actions on single line

Actual behavior

python.datascience.execSelectionInteractive is observably quite slow, especially compared to python.datascience.runcurrentcell which is instant.

Expected behavior

python.datascience.execSelectionInteractive should take the same amount of time as python.datascience.runcurrentcell

test

^ In this screenshot I pressed

  • python.datascience.execSelectionInteractive
  • python.datascience.runcurrentcell
  • python.datascience.execSelectionInteractive
  • python.datascience.runcurrentcell

Much more logs are displayed when pressing python.datascience.execSelectionInteractive

Your Jupyter and/or Python environment

  • Jupyter server running: Local
  • Extension version: 2020.3.71659
  • VS Code version: 1.43.2
  • Setting python.jediEnabled: false
  • Python and/or Anaconda version: 3.8.2
  • OS: Archlinux
  • Virtual environment: venv

Developer Tools Console Output

Full output: console.log

My guess

It seems like python.datascience.execSelectionInteractive is trying to find interpreters every time it runs while python.datascience.runcurrentcell does not. It also seems like finding interpreters is slow, this would explain why starting up my notebook can be pretty slow; but I don’t mind that as long as it runs well…

I prefer python.datascience.execSelectionInteractive so it’d be nice if it wasn’t slow 😦 Thank you for the awesome extension regardless.

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidKutucommented, Apr 13, 2020

Hi @u8sand. Thank you for your feedback, it is very well researched.

execSelectionInteractive does indeed end up looking for all the interpreters. We’ll discuss this issue in our next triage.

0reactions
u8sandcommented, Jun 12, 2020

Execution time of the cell didn’t change, UI responsiveness changed (see screenshot).

Checking now it was in-fact fixed–thanks! 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

python.datascience.execSelectionInteractive is very slow ...
Bug: python.datascience.execSelectionInteractive is very slow compared to python.datascience.runcurrentcell. Steps to cause the bug to occur.
Read more >
python.dataScience is "Unknown Configuration Setting" in ...
I am running VS Code (Version 1.52) ...
Read more >
Shift+Enter does not send code to Python Interactive
When I do this now, the code gets sent to the Terminal. Shift + Enter is registered as a keyboard shortcut for both...
Read more >
If Python is slow, why is it so widely used for things like ...
Since data science / data analysis involves more experimentation the net effect is often that your work gets done faster even though the...
Read more >
Is Python Slow? Use Cases and Comparison to Other ...
Some developers continue to claim that although Python is easy to learn, it is simply too slow. Is it true? Find out if...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found