REditorSupport / vscode-R

R Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=REditorSupport.r
MIT License
1.06k stars 125 forks source link

Sporadic 104% CPU utilization by Code Helper #1401

Open Shoeboxam opened 1 year ago

Shoeboxam commented 1 year ago

Describe the bug Sporadically when I run devtools::check() via a VSCode task, VSCode becomes laggy (~1 frame every 15 seconds or less). Files will no longer save, and the Mac Activity Monitor shows a process Code Helper at 104% CPU utilization.

This PID seems to be spawned by vscode-R, though I can't be certain:

```shell ps aux | grep 74909 michael 74909 99.8 1.7 1595055600 292368 ?? R 4:20PM 4:30.87 /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) --type=renderer --user-data-dir=/Users/michael/Library/Application Support/Code --standard-schemes=vscode-webview,vscode-file --enable-sandbox --secure-schemes=vscode-webview,vscode-file --bypasscsp-schemes --cors-schemes=vscode-webview,vscode-file --fetch-schemes=vscode-webview,vscode-file --service-worker-schemes=vscode-webview --streaming-schemes --app-path=/Applications/Visual Studio Code.app/Contents/Resources/app --enable-sandbox --enable-blink-features=HighlightAPI --first-renderer-process --lang=en-US --num-raster-threads=4 --enable-zero-copy --enable-gpu-memory-buffer-compositor-resources --enable-main-frame-before-activation --renderer-client-id=4 --time-ticks-at-unix-epoch=-1691237584160409 --launch-time-ticks=806869300309 --shared-files --field-trial-handle=1718379636,r,5063751642301275775,14862766121404794949,131072 --disable-features=CalculateNativeWinOcclusion,SpareRendererForSitePerProcess --vscode-window-config=vscode:7a6c3975-a481-49cf-96fc-954ed396f7d8 --seatbelt-client=55 michael 17471 0.0 0.0 408636160 1456 s026 S+ 12:27AM 0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox 74909 ```

Whenever this happens, I Force Quit the process from the Mac Activity Monitor, which crashes VSCode, allowing me to start VSCode again to normal operation.

To Reproduce

I use the following build task (simply run devtools::check from another folder):

        {
            "label": "R/ check (devtools only)",
            "type": "shell",
            "group": "build",
            "command": "cd R/opendpbase/ && Rscript -e 'devtools::check()'"
        },

Same issue occurs if I run cd R/opendpbase/ && R CMD build . && R CMD check --as-cran opendpbase_*.tar.gz.

The issue happens sporadically, about once every 4-5 task runs. The issue doesn't appear when I run the same command from a non-VSCode terminal.

Can you fix this issue by yourself? (We appreciate the help)

No.

Expected behavior VSCode should not freeze when I run R tasks.

Environment (please complete the following information):

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 365 days with no activity.