I'm running Rstudio Version 1.1.419 with R-3.3.2 on Windows 10.
Starting yesterday the console takes a very long to respond to to process a simple command I use to run. I tried both re-installing R studio and deleting(renaming) the Rstudio-Desktop directory, but that did not solve the problem.
Do you see this slowness in all RStudio projects, or only certain ones? From a new RStudio session launched in a project where you're seeing this slowness, can you try running and providing the output of:
system("cmd.exe /C dir")
system("cmd.exe /C dir /AH")
Are you by any chance using a remote / networked filesystem (e.g. a remote directory mounted locally)?
I'm not using a networked filesystem, and I'm running the very same script and functions that were perfectly working 2 days ago. It's happening in all RStudio projects, but only in certain functions within the script.
I just run it and got the error 127 (see below).
Thanks.
system("cmd.exe/C dir")
Warning message:
running command 'cmd.exe/C dir' had status 127
system("cmd.exe/C dir/AH")
Warning message:
running command 'cmd.exe/C dir/AH' had status 127
We discovered one issue where Git-managed projects whose .git folder is not hidden for some reason can lead to slowness / hangs within RStudio (usually manifesting as extremely slow time for execution of commands in the console).
Executing that shows the files within the (project) directory, as well as hidden files in that directory. It's a way for me to see if this could be the culprit in the slowness observed (does a .git directory exist, and if so, is it hidden?)
@tjmahr can you elaborate on the slowness you're seeing? Is it only in certain projects, or all of them? Is the slowness manifesting as e.g. 'laggy typing', or is it more like the R console takes a long time to respond to submitted commands?
system("cmd.exe /C dir /AH")
El volumen de la unidad C es Acer
El n£mero de serie del volumen es: F4BA-4F27
Directorio de C:\Users\pau_k\Documents\OPL\Experiments\EXPERIMENT 1 - Trastuzumab Resistance - TiOx\ClassI pSites\R\180212
No se encuentra el archivo
Warning message:
running command 'cmd.exe /C dir /AH' had status 1
Indeed, It's happening in all projects, and it seems to be the R console taking more time to respond to submitted commands (especially in functions with loops) which were running normally beforehand.
Thanks.
Sure, it's Rstudio that's the slow one for me. I get a really long spinner on the package pane when it tries to list packages. It get really long spinner when I try to check for package updates (the three dots on the Update Packages screen) or try to close Rstudio. It hits some projects a lot harder than others. The only fix I have found is to add the processes Rterm.exe, rsession.exe, rstudio.exe, git.exe to the list of Windows Defender Exclusions.
@tjmahr: Thanks for following up. Does your workaround indeed fix the issue in your case? If so, it feels like this could be outside of RStudio's control.
@tjmahr :thank you! You are my savior!! This problem has crippled my work on two Windows10 PCs. I had no choice but to use a mac in my office. Following your instructions, everything is fine now.
How is this fix holding up for you? I'm struggling with the same random RStudio lag problem. It wasn't clear to me from your reply whether the fix continued to work or not. If it is still working, could you specify where to find the R and github exe files you added to Windows Defender exclusions? Also, did you have to restart RStudio and/or the computer before the changes took effect?
Having the same problem. It seems the antimalware service executable windows defender antivirus service can stop RStudio from working (save button non-responsive in RStudio - couldn't even save or shut down RStudio - thankfully I could copy and paste my code to somewhere else but environment was lost)
I had a similar issue:
Very long delays when clicking the button on the Git tab save a commit, the time it took to show the changes in the commit window, and the time it took to push a commit once the commit was saved.
Disabling real time monitoring in both Windows Defender and Malwarebytes fixed it.
At work I had to migrate from windows 7 to windows 10 two days ago. Since then I am seeing much of what is described in this thread. Noteworthy difference is that windows defender is disabled on our system (McAffee instead). The problem is present regardless of git enabled repositories or simple projects. It also does not matter whether they are located on a network drive or locally. I am on R 3.4.4 (2018-03-15) -- "Someone to Lean On", windows 10 - 64 bit. Latest version of RStudio 1.1.442 as well as yesterdays daily build are pretty much unusable. I have reverted back to RStudio v1.0.153 which performs better, but is still laggy every once in a while. Maybe it is worth investigating what changed between 1.0.153 and later versions.
I have issued a ticket with our company IT, but so far no response.
I will report back whenever we get this solved.
Some users have reported that the slowness is alleviated if the HOME environment variable is set to a local path, e.g.
HOME=C:\Users\<me>
Does this make a difference in your case?
I'd also be curious to see a copy of the event log when the slowness occurs. This can be done by pressing Ctrl + `. You can then take a screenshot and let us know if any of the bars that show up are very 'long' (as that request might be associated with the slowness)
Thanks! It's very surprising to me that the modify_document_properties calls are taking so long; those are RPC requests made to synchronize document properties (e.g. the cursor location) with the server.
These get triggered somewhat eagerly -- for example, after moving the cursor and then idling, the cursor position will get synchronized with the server. I wonder why that's taking longer in your case?
Are you working with files, or a project, living on a network share or something similar? Or might your RStudio installation live on a networked filesystem?