Skip to content

Instantly share code, notes, and snippets.

@ateucher
Last active January 4, 2018 22:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ateucher/f279abc1f7ba12f2763152c18810fb24 to your computer and use it in GitHub Desktop.
Save ateucher/f279abc1f7ba12f2763152c18810fb24 to your computer and use it in GitHub Desktop.
Slow RStudio View() on PC with HOME drive on a network

Using View() is very slow - RStudio v1.1.336 on Windows 7 in an enterprise environment

In RStudio View(iris) is very slow - it locks up RStudio for ~5-10s or more. I have no idea why this difference exists.

I ran the following to find out my HOME directory:

$ echo $HOME

This returns /h/ - my Home drive on the network

If you run:

$ setx HOME $USERPROFILE (in bash)

OR

> setx HOME "%USERPROFILE%" (in CMD)

this sets HOME to c:/Users/[username], and it appears to fix the problem - View(iris) is now fast everywhere!

Caveat: I currently have all of my dotfiles (.Rprofile, .Renviron, .gitconfig, .bashrc, etc.) in my H:/ (home network) drive because that is (has been) the HOME directory. If you set HOME to c:/Users/[username] as above, you will need to move all of your dotfiles there.

@mohammed80
Copy link

Hello,
Should I ran the command before or after installation?

@petbadger
Copy link

This solution worked for me on Win7 Enterprise, Service Pack 1, Build 7601.

Every single data set I opened would have a 10 second delay or so. Creating a new file would have about a 3 second delay. Both problems are now gone.

Rstudio showed my default working directory (~) was indeed pointing to a network drive. (For those who are curious, in your command prompt type "net use" to show mapped network drives.)

Now with HOME pointing to my local drive, opening data sets and new files is snappy. Finally! Thanks for the solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment