"Python extension loading" super slow
See original GitHub issueEnvironment data
- VS Code version: 1.50.1 (local)
- Extension version (available under the Extensions sidebar): local : python v2020.10.332292344 remote :v2020.10.332292344
- OS and version: Ubuntu 19.10
- Python version (& distribution if applicable, e.g. Anaconda): XXX
- Type of virtual environment used (N/A | venv | virtualenv | conda | …): venv
- Value of the
python.languageServer
setting: Jedi
Expected behaviour
Be able to connect to VScode in remote in less than 15mins
Actual behaviour
Connects after 10/15 mins
Steps to reproduce:
- Connect to my company VPN
- open VScode
- connect to remote ssh (working)
- open a project and try to load kernels
- XXX
Logs
console.ts:137 [Extension Host] (node:17707) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:70
workbench.html:1 A cookie associated with a cross-site resource at https://visualstudio.com/ was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at https://www.chromestatus.com/feature/5088147346030592 and https://www.chromestatus.com/feature/5633521622188032.
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
console.ts:137 [Extension Host] (node:28811) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
t.log @ console.ts:70
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:33637...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][Management ][ae41d…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][Management ][ae41d…][reconnect] waiting for 5 seconds before reconnecting...
extensionsViews.ts:288 Error querying extensions gallery Canceled
(anonymous) @ extensionsViews.ts:280
log.ts:185 INFO [remote-connection][Management ][ae41d…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][Management ][ae41d…][reconnect] connecting to 127.0.0.1:46331...
log.ts:185 INFO [remote-connection][Management ][ae41d…][reconnect] reconnected!
log.ts:197 ERR read ECONNRESET: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:200:27)
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:197 ERR Unknown terminal: 4: Error: Unknown terminal: 4
at f._getTerminalProcess (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:5247:326)
at f._onRequestLatency (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:5246:792)
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
localProcessExtensionHost.ts:257 Extension Host
localProcessExtensionHost.ts:258 Debugger attached.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:197 ERR write EPIPE: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:149:25)
at writeGeneric (internal/stream_base_commons.js:140:3)
at Socket._writeGeneric (net.js:776:11)
at Socket._write (net.js:788:8)
at doWrite (_stream_writable.js:435:12)
at writeOrBuffer (_stream_writable.js:419:5)
at Socket.Writable.write (_stream_writable.js:309:11)
at Socket.ondata (_stream_readable.js:728:22)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
console.ts:137 [Extension Host] Error: Unexpected SIGPIPE at process.<anonymous> (/usr/share/code/resources/app/out/bootstrap.js:5:377) at process.emit (events.js:223:5)
t.log @ console.ts:70
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:197 ERR write EPIPE: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:149:25)
at writeGeneric (internal/stream_base_commons.js:140:3)
at Socket._writeGeneric (net.js:776:11)
at Socket._write (net.js:788:8)
at doWrite (_stream_writable.js:435:12)
at writeOrBuffer (_stream_writable.js:419:5)
at Socket.Writable.write (_stream_writable.js:309:11)
at Socket.ondata (_stream_readable.js:728:22)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
console.ts:137 [Extension Host] Error: Unexpected SIGPIPE at process.<anonymous> (/usr/share/code/resources/app/out/bootstrap.js:5:377) at process.emit (events.js:223:5)
t.log @ console.ts:70
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/semver-umd/lib/semver-umd.js.map:
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/tas-client-umd/lib/tas-client-umd.js.map:
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/xterm/lib/xterm.js.map:
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/xterm-addon-unicode11/lib/xterm-addon-unicode11.js.map:
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/xterm-addon-search/lib/xterm-addon-search.js.map:
DevTools failed to load SourceMap: Could not load content for file:///usr/share/code/resources/app/node_modules.asar/vscode-textmate/release/main.js.map:
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:197 ERR write EPIPE: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:149:25)
at writeGeneric (internal/stream_base_commons.js:140:3)
at Socket._writeGeneric (net.js:776:11)
at Socket._write (net.js:788:8)
at doWrite (_stream_writable.js:435:12)
at writeOrBuffer (_stream_writable.js:419:5)
at Socket.Writable.write (_stream_writable.js:309:11)
at Socket.ondata (_stream_readable.js:728:22)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
console.ts:137 [Extension Host] Error: Unexpected SIGPIPE at process.<anonymous> (/usr/share/code/resources/app/out/bootstrap.js:5:377) at process.emit (events.js:223:5)
t.log @ console.ts:70
$logExtensionHostMessage @ remoteConsoleUtil.ts:29
_doInvokeHandler @ rpcProtocol.ts:401
_invokeHandler @ rpcProtocol.ts:332
_receiveRequest @ rpcProtocol.ts:278
_receiveOneMessage @ rpcProtocol.ts:220
(anonymous) @ rpcProtocol.ts:93
fire @ event.ts:535
fire @ ipc.net.ts:407
_receiveMessage @ ipc.net.ts:755
(anonymous) @ ipc.net.ts:630
fire @ event.ts:535
acceptChunk @ ipc.net.ts:224
(anonymous) @ ipc.net.ts:149
t @ ipc.net.ts:892
emit @ events.js:223
addChunk @ _stream_readable.js:309
readableAddChunk @ _stream_readable.js:290
Readable.push @ _stream_readable.js:224
onStreamRead @ internal/stream_base_commons.js:181
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] resolving connection...
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] connecting to 127.0.0.1:46331...
log.ts:197 ERR write EPIPE: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:149:25)
at writeGeneric (internal/stream_base_commons.js:140:3)
at Socket._writeGeneric (net.js:776:11)
at Socket._write (net.js:788:8)
at doWrite (_stream_writable.js:435:12)
at writeOrBuffer (_stream_writable.js:419:5)
at Socket.Writable.write (_stream_writable.js:309:11)
at Socket.ondata (_stream_readable.js:728:22)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23)
console.ts:137 [Extension Host] Error: Unexpected SIGPIPE at process.<anonymous> (/usr/share/code/resources/app/out/bootstrap.js:5:377) at process.emit (events.js:223:5)
t.log @ console.ts:70
$logExtensionHostMessage @ remoteConsoleUtil.ts:29
_doInvokeHandler @ rpcProtocol.ts:401
_invokeHandler @ rpcProtocol.ts:332
_receiveRequest @ rpcProtocol.ts:278
_receiveOneMessage @ rpcProtocol.ts:220
(anonymous) @ rpcProtocol.ts:93
fire @ event.ts:535
fire @ ipc.net.ts:407
_receiveMessage @ ipc.net.ts:755
(anonymous) @ ipc.net.ts:630
fire @ event.ts:535
acceptChunk @ ipc.net.ts:224
(anonymous) @ ipc.net.ts:149
t @ ipc.net.ts:892
emit @ events.js:223
addChunk @ _stream_readable.js:309
readableAddChunk @ _stream_readable.js:290
Readable.push @ _stream_readable.js:224
onStreamRead @ internal/stream_base_commons.js:181
log.ts:185 INFO [remote-connection][ExtensionHost][bfd86…][reconnect] reconnected!
INFO [remote-connection][ExtensionHost][bfd86…][reconnect] starting reconnecting loop. You can get more information with the trace log level.
INFO [remote-connection][ExtensionHost][bfd86…][reconnect] waiting for 5 seconds before reconnecting...
I succesfully connect to notebooks thanks to our Jupyterhub. Don’t know if my VPN is not stable enough however it is strange because I do not have problems on youtube for example.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Python extension slow to load : r/vscode - Reddit
Another Python extension loading super slow is because production group. try to run python for each of the installed and know virtual ...
Read more >Improving load times and performance of Python Extension for ...
The solution is quite simple, reduce this size. In webpack, one simple and obvious approach is to use the production mode, this automatically ......
Read more >Python extension slow to load or doesn't load?
When I start a course and click on a Python code module, sometime it takes 5-10 minutes for the Python extension to load...
Read more >VS code python autocompletion very slow - Stack Overflow
The autocompletion and color syntaxing is very slow (more than 153secs). I tried to disable all extensions as mentionned here Visual Studio ...
Read more >Solved: Python extension running really slow
Python extension running really slow. 07-27-2022 12:57 PM. Hi, I'm creating a script that adds a new column to my data, and it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A quick update on this issue. We have a new environment discovery module, we are working on getting it to parity with the types of environments that we support. A change we did was to avoid running python and get as much detail about an environment using meta-data only. In cases where we do need to run python we throttle the number of processes to reduce the load. We are working on some bugs with the new code, when it is ready I will report back here with instructions on how to enable it.
Please try opting into
pythondiscoverymodule
experiment. This should resolve most of the issues where the extension ran too many python processes on startup. This will soon be enabled for all users, so closing this. Anyone running into this issue please try this and if you run into any bugs please file separate issues.