RStudio is running very slowly for me on a network drive. I think my issue is similar to some previous ones, but I'm not sure how to handle it.
- Running RStudio 2023.05.0 Build 180
- Two different projects. Both use renv. Project A has git; Project B does not have git.
In project A, sometimes RStudio gets really laggy. Takes a long time to run commands that should be quick, such as
head(mtcars). Takes an especially long time to display plots (even simple ones) or documentation files in the Plots/Help pane. Git operations are also pretty slow, though not crazy slow. Note that this behavior is not always reproducible. Sometimes things run really fast! Other times they are very slow. I can't figure out a common thread. Just now I re-tried
head(mtcars) and it ran with no problem, but in the past the same call has taken something closer to 3-4 seconds, which is waaay too long for something that small.
There also seems to be a lag in sending the code to the console. No red stop sign shows up. Often the code I've just pressed "run" on doesn't even print to the console, and it appears as though nothing at all is happening. Then all of a sudden a bunch of lines will run all at the same time.
This doesn't appear to be happening in Project B (same account, same network drive, same version of RStudio), but I can't guarantee that it never happens there. Just haven't observed it yet.
I found this issue and looked at my network log.
Project B (not laggy):
Project A, right after I did ?dudi.pca to pull up a help file (it took >5 seconds just to pull up this help file):
I also followed @kevinushey's suggestion to run
.rs.listInstalledPackages() and see if it was slow. I ran it in Project A (laggy) and it took maybe 1 second. Ran it again and it took <1 second. It was slightly faster in Project B but not dramatically. So I don't think this is the issue here. (But that's why I mentioned that both of these projects are using renv--might be relevant).
This issue also mentioned sluggishness on startup. I have not noticed abnormal startup sluggishness in this project; here's the network log after closing and reopening it. It takes maybe 5-10 seconds to start up, but that's in line with my other projects and doesn't really pose a barrier to working.
I tried following the trail of links referencing the previous issue, but I couldn't tell if things got resolved, and it was a few years ago, so obviously I'm dealing with a much different version of RStudio now.
Can anyone help me figure out what to do here? This is getting so slow that it's really affecting my ability to work.
Thank you so much!