RStudio suddenly slow/unresponsive and continues on new computer with fresh install

I have been using R Studio on a near daily basis at home while teleworking for the past several months without any issue. I typically leave my R Studio session running so I can jump right back into wherever I left off. However, last week I tried to do so with a session that was running fine and I ran a line of code that ran previously without issue, but this time it hung up R Studio without the "Stop sign" button appearing to kill the process. Such issues are annoying, but happen from time to time. So I had to end the task from Task Manager to close R Studio. I restarted R Studio and while the GUI opened up fine, no code would run. I tried going to various drop down menus, which would successfully drop down, but any option I chose would also be unresponsive (e.g. About R Studio or Set Working Directory or Open File).

At this point I was more inclined to blame my laptop which had been accumulating issues suggesting it was on its way out. I tried rebooting the laptop, but had the same problem with R Studio while all other software seemed to be working fine. I tried running R by itself, and it worked fine. I tried uninstalling and reinstalling R Studio, but the issue persisted. This became the last straw for me to get my laptop looked at by our IT department, and they decided the system board was on its way out. So I figured the problem was probably the laptop itself.

Yesterday I received my loaner laptop which has a fresh install of R Studio 1.3.1093 and R 4.0.3. I opened up R Studio and tried to open a new R Script, and it wouldn't respond. Then I tried opening one of my existing R scripts, and it wouldn't do it. I tried changing my working directory, and that worked. Eventually, the Source pane opened up with the new script tab and my pre-existing script. So I started trying to install some packages I needed. Again, it just hung up without the "Stop sign" button. At about this point I was noticing in my Task Manager that R Studio was using quite a bit of GPU but little to no CPU. I ended R Studio and restarted it. This time when I tried installing a package, it was slow but eventually worked. I thought maybe R Studio pushed through its issues because I got all my packages installed and loaded, and was able to load up one of my old workspaces. Since then, sometimes my code runs without issue, but often I will run a really simple line of code (like assigning a character vector to a variable) and it takes over a minute to complete the task. Again, Task Manager is claiming R Studio is using GPU rather than CPU when its taking a long time to process a simple line of code.

I can't figure out why this problem started in the middle of a working session and continues to persist across restarts, reboots, reinstalls and fresh install on a new computer. It is a bit more responsive for me now, but still frequently hangs up or takes a long time to accomplish simple tasks, which is greatly impeding my work. Please help!

Thank you,
Jason

Hi, welcome!

Have you tried changing to software rendering?, you can change it by holding the Ctrl key while opening RStudio, then you should see this menu and change the "Rendering Engine" to "Software".

Thanks for the suggestion, Andresrcs! I tried it, and it did stop R Studio's use of GPU. However, it hasn't improved the slow response times. I just tried loading a previously installed package, and it took at least 5min. Here is a screen shot of the request log:

image

Other things you can try are:

I tried both suggestions without any luck.

In case it helps, here is the Request Log while I was waiting to simply save my R script.

And here is the Request Log while waiting for a script file to load up after I had reset R Studio's internal state as described in the link you posted above.

Update: After more digging around in the rsession logs and the forum, I think I may have found the root of the problem. I believe there is at least one security program that my IT department has set up on my computer that is recognizing normal R processes as a potential threat and stopping them. Here's a picture that summarizes the evidence:

I'm currently waiting for my IT department to get back to me with a fix. If this turns out to do the trick, I will try to remember to mark this as solved.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.