Rstudio is very slow when it opens

Rstudio has become super slow when it opens. I tried almost everything that I found in the forum and elsewhere, including, for instance, this RStudio suddenly slow processing, this RStudio suddenly slow processing - #13 by kthuot, or this RStudio running slow and impeding work.
I run Rstudio (and R) in a local folder, possess enough free space in the disk, disabled diagnostics, and even whitelisted both programs in my antivirus (Bitdefender).
Any help will be much appreciated.

It's probably a bit of a long-shot, but you could try resetting RStudio's desktop state.

Thanks a lot for your prompt reply, prubin. I also tried that solution before asking for help. I renamed the RStudio folder in the Local folder
image
and the respective Rstudio folder in the Roaming folder
image
Then, I installed Rstudio and R, restarted my PC, and reinstalled the two program files, but the problem persisted.
Kind regards

Is this Windows? I'm not sure (being a Linux user), but I think the files under Roaming are user preferences rather than RStudio state. The linked instructions specify where to find the state folders.

Beyond that, if you start RStudio from a command prompt, do you get any error or diagnostic messages?

Also, just to be clear, is the issue that RStudio takes a long time from when you start it to when it responds to use, or does it start promptly but then act very sluggish when being used?

Hi Prubin,
I will try to answer your questions.

  1. Yes, RStudio runs in Windows 11 environment.
  2. I am unsure what you mean by saying that "files under Roaming are user preferences rather than RStudio state". For sure, both the "Roaming" and the "Local" folders belong to the "AppData" folder, which belongs to the "User" folder.
  3. When I open RStudio with the typical shortcut, it takes me 40.28 seconds (I have just measured it). When I open it through the command prompt, it takes 14.06 seconds.
  4. Regarding your last question, RStudio worked perfectly well (and fast) until three months ago. Since then, it has become too slow (my laptop is quite powerful: i7 processor with SSD (and +250GB free space) and enough RAM.

According to the document I linked, your user preferences (which are unlikely to be the culprit) are in the RStudio folder under AppData. The RStudio internal state poop is in a different folder named RStudio under the %localappdata% folder. (Note the "local".) You can try cd-ing to that in a command window and see where it is. That's the puppy you want to delete (or rename, in order to keep it just in case).

The fact that it starts much faster from a command prompt makes me wonder if the shortcut is buggered. Can you inspect the menu shortcut and see if it points to a different executable than what you run from the command prompt, or maybe has some command line switches/options?

Dear Prubin,
Thanks for your assistance and helpful hints. Your remarks helped me realize that perhaps there is something more fundamental regarding my laptop. I, therefore, reinstalled Windows and all the software programs. When I did so, RStudio behaved as it used to be: It opened in 1-2 seconds. But it reverted back to its sluggish condition once I reinstalled and reactivated my antivirus program (BitDefender). I cross-checked whether this was the culprit by removing BitDefender one more time. Again, RStudio behaved as expected (opened in 1-2 seconds), only to return to its slow mode when Bitdefender was reactivated. I sent an issue to them and am waiting for their response. I will let you (and the community) know whether there is a conflict issue between RStudio and Bitdefender.

This topic was automatically closed 90 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.