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.

Performance issues - occassional UI freeze

See original GitHub issue

Issue Type: Performance Issue

Behaviour

I use a vim emulation extension (tried both Vim and VScode Neovim), and occasionally while editing Python projects my editor will stop responding to my vim commands for a while. Most of the time this is accompanied with the spinning icon in the status bar with “X files to analyze…”, but not always.

Expected vs. Actual Behaviour

Editor will not freeze.

Steps to reproduce:

Edit a large Python project. I have not been able to pinpoint what causes a freeze, but it’s usually after changing a file (as opposed to just moving around between files).

Attachments

I recorded a profile while the editor was stuck. There was also a message in the console saying WARN UNRESPONSIVE extension host, 'ms-python.python' took 99% of 5897.347ms, saved PROFILE here: 'file:///tmp/exthost-46bf7e.cpuprofile' , and I attached that file as well. My trace: python-stuck-CPU-20220120T190655.203Z.cpuprofile.txt Automatically captured trace from warning: exthost-46bf7e.cpuprofile.txt

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.12 - self-compiled from Arch AUR
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): VirtualEnvWrapper
  • Value of the python.languageServer setting: Pylance
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "black"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: false
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: false
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

insidersChannel: "off"

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2021.12.1559732655 VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:39:46.686Z) OS version: Linux x64 5.16.1-arch1-1 Restricted Mode: No

System Info
Item Value
CPUs Intel® Core™ i7-8665U CPU @ 1.90GHz (8 x 2947)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 3, 2, 2
Memory (System) 15.44GB (2.31GB free)
Process Argv –no-sandbox --unity-launch --crash-reporter-id 4eca593c-aba3-413d-89f9-312acde53d4b
Screen Reader no
VM 0%
DESKTOP_SESSION undefined
XDG_CURRENT_DESKTOP sway
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE wayland
Process Info
CPU %	Mem MB	   PID	Process
    0	   206	252664	code main
    0	    32	252667	   zygote
    0	   126	252693	     gpu-process
    0	    32	252668	   zygote
    0	   285	314060	     window (undefined)
    0	    79	316208	     issue-reporter
    0	    63	252715	   utility-network-service
    0	   158	252881	   shared-process
    0	    79	252903	     ptyHost
    0	     0	253055	       /usr/bin/fish
    0	    79	285791	     watcherServiceParcelSharedProcess
    0	     0	316227	     /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0	   601	285747	   window (extension.js - medigator - Visual Studio Code)
    0	   632	285779	   extensionHost
    0	    47	285888	     /usr/bin/nvim -N --embed -c source /home/nadav/.vscode/extensions/asvetliakov.vscode-neovim-0.0.83/vim/vscode-options.vim --cmd source /home/nadav/.vscode/extensions/asvetliakov.vscode-neovim-0.0.83/vim/vscode-neovim.vim -c cd /home/nadav/medigate/medigator
    0	   111	285958	     /opt/visual-studio-code/code --ms-enable-electron-run-as-node /home/nadav/.vscode/extensions/streetsidesoftware.code-spell-checker-2.1.4/packages/_server/dist/main.js --node-ipc --clientProcessId=285779
    0	   601	312446	     /opt/visual-studio-code/code --ms-enable-electron-run-as-node /home/nadav/.vscode/extensions/ms-python.vscode-pylance-2022.1.1/dist/server.bundle.js --cancellationReceive=file:418b001d30a217033d47d5abb273c4150e7f7ad90f --node-ipc --clientProcessId=285779
    0	   285	315720	     /opt/visual-studio-code/code --ms-enable-electron-run-as-node --max-old-space-size=3072 /opt/visual-studio-code/resources/app/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /tmp/vscode-typescript1000/b7c2f460e29470229b77/tscancellation-1936e2fa1524f4d3e450.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations /home/nadav/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.15 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
    0	   411	315721	     /opt/visual-studio-code/code --ms-enable-electron-run-as-node --max-old-space-size=3072 /opt/visual-studio-code/resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /tmp/vscode-typescript1000/b7c2f460e29470229b77/tscancellation-df7a9c7c3d22ec906e07.tmp* --globalPlugins @vsintellicode/typescript-intellicode-plugin --pluginProbeLocations /home/nadav/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.15 --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
    0	    79	315747	       /opt/visual-studio-code/code --ms-enable-electron-run-as-node /opt/visual-studio-code/resources/app/extensions/node_modules/typescript/lib/typingsInstaller.js --globalTypingsCacheLocation /home/nadav/.cache/typescript/4.5 --enableTelemetry --typesMapLocation /opt/visual-studio-code/resources/app/extensions/node_modules/typescript/lib/typesMap.json --validateDefaultNpmLocation
Workspace Info
|  Window (extension.js - medigator - Visual Studio Code)
|      Error: Unable to collect workspace stats for folder /home/nadav/medigate/medigator (TypeError: t is not iterable);
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30425749
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30424896
pythonvs932:30410667
vscop804:30404766
vs360cf:30404996
vsrem710cf:30416617
vsbas813:30426126

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
karthiknadigcommented, Jan 21, 2022

We are re-writing the test adapters, when that work is done it should improve the test scenario (if that is the thing that was causing the UI freeze). #17242

0reactions
karthiknadigcommented, Feb 1, 2022

Thanks for letting us know. I will close this for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the Windows 10 Freezes Randomly Issue - TechLoris
If you experience your computer freezing randomly, it could be caused by a failing hard disk, insufficient disk space, and more. If you're ......
Read more >
Windows 10 Small Freezes/Hiccups/Lag Spikes
Try the following methods to resolve your issue. Method 1: Run performance troubleshooter to optimize Windows performance, try using the ...
Read more >
Why does my PC freeze/lag occasionally during games?
I'm new to PC gaming and am unsure if what I'm experiencing is normal. In all of my games (Arkham City, Tomb Raider,...
Read more >
Occasional Brief Stutter/freeze when looking left/... - 708756
So in just about every game, I have extremely smooth performance with the exception of one thing: any movement of the head left...
Read more >
How to Fix iOS 15 Performance Problems - Gotta Be Mobile
The current list of iOS 15 performance issues includes UI lag, freezes, lock ups, and random reboots. These are extremely common, ...
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