Repository navigation
Python file now runs slowly #1830
Description
Activity
The code now runs slowly with this extension; when I click the "Run" button, it takes 5 minutes to start, and the command launching the code—along with the result—only appears after a 5-second delay. Without this extension, the code runs as usual—very quickly
I was getting about a 5 second delay after pressing the "Run" button before the Python script actually started running. Downgrading the extension to version 1.36.0 seemed to solve the issue.
- assigned and unassigned
on Sep 28, 2026 StellaHuang95 commented
on Sep 28, 2026 ContributorMore actionsThis looks like a regression introduced by #1741, which added a wait for VS Code’s shell integration before sending a Python command to the terminal. The Run button uses this same execution path, so if shell integration is unavailable and no new terminal prompt output is detected, it waits for the default five-second timeout before launching the script. This wait can repeat even when reusing an existing terminal, explaining the delay before the command and its output appear rather than slower execution of the Python code itself. Downgrading to 1.36.0 removes this added wait, which makes that change a strong suspect.
Reacted by Eduardo Villalpando Melloedvilme commented
on Sep 30, 2026 ContributorMore actionsHello, thanks for bringing this to our attention. To help narrow down the delay, could you please tell us:
- What OS and terminal shell (bash, zsh, fish) are you using?
- Is
terminal.integrated.shellIntegration.enabled, and have you customizedterminal.integrated.shellIntegration.timeout? - Does the delay happen only on the first run in a new terminal, or does it happen for every run in the same terminal?
Hello, Just wanted to add my findings to the issue as well.
With the Python Environments extension installed, opening a new integrated terminal took about five seconds. Clicking Run Python File had the same delay before the terminal appeared. This happened with both PowerShell and Command Prompt. After uninstalling Python Environments, terminal startup and running the file were immediate.
The integrated terminal should open promptly; running a Python file should not incur a multi-second delay before the terminal appears.
Uninstalling python-environments returns everything to normal.
For now, I found a solution:
- Open PowerShell as Administrator
- Run this code: "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine"
It worked for me; I'm not sure about others, but it's worth mentioning! :D
The code now runs slowly with this extension; when I click the "Run" button, it takes 5 seconds to start, and the command launching the code—along with the result—only appears after a 5-second delay. Without this extension, the code runs as usual—very quickly