You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
%%timeit -n 1 -r 1
testvec2 = [[1] * 20] * 200
for i, val in enumerate(testvec2):
print(f"Using print: {val}")
display(val)
The loops themselves are quick enough, the cell is executed in 353ms. The rest of the time is Vs Code trying to do the actual drawing in the notebook. The dev tools log seems to finish the logging way before the Notebook UI is completed.
Actual behavior
The first run takes 9s on my computer.
The second run takes 55 seconds(!!).
Expected behavior
No hanging. Same execution speed as Jupyter Lab which is below one second no matter how many cells that contain the same statement as above.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
Jupyter server running: Local
Extension version: v2020.6.90262
VS Code version: 1.46.1
Setting python.jediEnabled: false
Setting python.languageServer: Microsoft
Python and/or Anaconda version: 3.8.2
OS: Windows
Virtual environment: conda
Developer Tools Console Output
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Waiting for jupyter server and web panel ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Loading web panel. Panel is notset
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Loading web view...
console.ts:137 [Extension Host] Warn Python Extension: 2020-06-26 12:47:59: startHttpServer=false, will not be used. Temporarily turned off
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:402
_invokeHandler @ rpcProtocol.ts:387
_receiveRequest @ rpcProtocol.ts:303
_receiveOneMessage @ rpcProtocol.ts:230
(anonymous) @ rpcProtocol.ts:105
fire @ event.ts:587
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:587
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Web view created.
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Cached data exists getEnvironmentVariables, c:\Projects\xxxxxx.py
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Python Daemon (pid: 26252): write to stderr: [I 12:47:59.673 NotebookApp] Creating new notebook in /
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Python Daemon (pid: 26252): write to stderr: [I 12:47:59.749 NotebookApp] Kernel started: bd70cbd4-f88e-41ca-a168-ec1cfded16e8
console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/bd70cbd4-f88e-41ca-a168-ec1cfded16e8
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Started session b0ac5abc-cdc7-42df-932d-12adf3c64de0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Waiting for idle (session) b0ac5abc-cdc7-42df-932d-12adf3c64de0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:47:59: Waiting for idle on (kernel): bd70cbd4-f88e-41ca-a168-ec1cfded16e8 -> unknown
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Web view react rendered
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Request for onigasm file at c:\Users\stora\.vscode\extensions\ms-python.python-2020.6.90262\out\client\node_modules\onigasm\lib\onigasm.wasm
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Request for tmlanguage file.
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Searching for token colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Kernel: connected (bd70cbd4-f88e-41ca-a168-ec1cfded16e8)
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Finished waiting for idle on (kernel): bd70cbd4-f88e-41ca-a168-ec1cfded16e8 -> idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Attempting search for colors ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:00: Loading base colors from c:\Program Files\Microsoft VS Code\resources\app\extensions\theme-monokai-dimmed\themes\dimmed-monokai-color-theme.json ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Using colors to generate CSS ...
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Initialize config for plots for history://ec155b3b-dc18-49dc-9e99-9a948aa2f27b
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Python Daemon (pid: 26252): write to stderr: [I 12:48:01.061 NotebookApp] Creating new notebook in /
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Python Daemon (pid: 26252): write to stderr: [I 12:48:01.133 NotebookApp] Kernel started: 246d4ad5-81f2-47c3-8c5a-265004d9d2b2
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Run startup code for notebook: %config Completer.use_jedi = False - results: 1
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Initial setup complete for history://ec155b3b-dc18-49dc-9e99-9a948aa2f27b
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Finished connecting b0ac5abc-cdc7-42df-932d-12adf3c64de0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Registering commtarget jupyter.widget
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Adding sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Starting WebSocket: ws://localhost:8888/api/kernels/246d4ad5-81f2-47c3-8c5a-265004d9d2b2
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Waiting for idle on (kernel): 246d4ad5-81f2-47c3-8c5a-265004d9d2b2 -> unknown
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0 complete
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Submitting code for a8970cf0-68c4-4896-b413-8675115d64b0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Loading web panel. Panel is set
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Wait for sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Wait for sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Adding hash for 1 = 3b785743a102 with 7 lines
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to busy
webviewElement.ts:331 [Embedded Page] Starting WebSocket: BOGUS_PVSC/api/kernels/bd70cbd4-f88e-41ca-a168-ec1cfded16e8
webviewElement.ts:331 [Embedded Page] Kernel: connected (bd70cbd4-f88e-41ca-a168-ec1cfded16e8)
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:01: Finished execution for 910362be-1049-43a4-bf03-f27bfb4f4878
console.ts:137 [Extension Host] Kernel: connected (246d4ad5-81f2-47c3-8c5a-265004d9d2b2)
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:02: Finished waiting for idle on (kernel): 246d4ad5-81f2-47c3-8c5a-265004d9d2b2 -> idle
webviewElement.ts:331 [Embedded Page] Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq
webviewElement.ts:331 [Embedded Page] Failed to construct 'Worker': Script at 'vscode-resource://file///c%3A/Projects/rustpython/python_code/editor.worker.js' cannot be accessed from origin 'null'.
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Loading web panel. Panel is set
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Wait for sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Submitting code for a8970cf0-68c4-4896-b413-8675115d64b0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Loading web panel. Panel is set
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Wait for sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Wait for sys info for a8970cf0-68c4-4896-b413-8675115d64b0 0
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Adding hash for 2 = 3b785743a102 with 7 lines
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Kernel switching to busy
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Kernel switching to idle
console.ts:137 [Extension Host] Info Python Extension: 2020-06-26 12:48:14: Finished execution for 2a4ea016-fcc1-472c-99af-fdc8bad781b1
For #12588
At least in VS Code Notebooks, the improvement is fairly significant.
Down from 3minutes to 5 seconds.
Note: This doesn't completely resolve the slow times experienced in the existing Notebook Editor.
We have delays due to UI updates there (however that too is down from 3minutes to ~15 seconds).
That might probably need to be addressed separately.
Either way its a significantly improvement.
Thanks for your feedback. This issue will be addressed once VS Code adds native support for editing notebooks. Please see microsoft/vscode#91987. You can experiment by using VS Code insiders, which defaults to the new notebook experience.
Bug: Notebook Editor, Interactive Window, Editor cells
Steps to cause the bug to occur
Run the following code twice.
Running it in jupyterlab is almost instantaneous.
%%
The loops themselves are quick enough, the cell is executed in 353ms. The rest of the time is Vs Code trying to do the actual drawing in the notebook. The dev tools log seems to finish the logging way before the Notebook UI is completed.
Actual behavior
The first run takes 9s on my computer.
The second run takes 55 seconds(!!).
Expected behavior
No hanging. Same execution speed as Jupyter Lab which is below one second no matter how many cells that contain the same statement as above.
Your Jupyter and/or Python environment
Please provide as much info as you readily know
Developer Tools Console Output
Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl
The text was updated successfully, but these errors were encountered: