You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RStudio works extremely slow when opening a project on a network drive #10417
There are several bug reports related to this RStudio being slow with network drives on Windows but most of them focus on some specific aspects of the underlying problem. The underlying problem is that RStudio works extremely slow when opening a project that is located on a network drive (Windows). The Ctrl-. combination is useless. Simply opening a file can take ages. For quick fixes, I tend to open VSCode (or sometimes even IDEA) in the meantime, fix the problem and then return to RStudio to evaluate the code, which is quicker than waiting for RStudio to finish whatever it is doing.
Access to network drives is slower than access to local hard drives. Is it possible that useless accesses to the drive (e.g. to pull file information) are causing this problem? No other software behaves that badly.
This problem has pertained for several versions of RStudio, which is why I do not attach any session info. It would be useless. I'm pretty sure this problem has nothing to do with the version of R or the packages being loading.
I'm aware this isn't the best bug report. It would be nice though if somebody took notice this problem exists.
Reacted by Ville Ilmarinen, eijoac, Karl Ove Hufthammer, remshaam, Desi Quintans, R. Axel W. Wiberg, Corneel, Marcel Raab, krheED, Nikita Tikhomirov and 9 more
@tomtom Thank you for raising this! It's a perfectly good bug—and a clever workaround, though you shouldn't need to do it. You mention that this has been the case for several versions. Was there a version in which this wasn't an issue? What's the most recent version you're using?
@tomtom, could you try something for us? If you turn off the packages pane, is RStudio still very slow? Global Options -> Packages -> Enable packages pane (disable it). We suspect if you have a large directory that the IDE is searching recursively through that directory looking for packages. Which would still be a bug, but it would be nice to determine if that's the problem.
No, not really. BTW the project I checked this with contains 1100 files in 180 folders (including git), actual size is 1.62 mb, the size allocated 213.mb.
@tomtom, just to clarify, are you saying it's no longer slow if you disable the packages pane? If that's the case that would give us a good clue what's going on. Thanks!
Hopefully some of the delay will be improved as we move more information to the database (Spotted Wakerobin). This will need more investigation after that's been done.
I have the same issue with Windows 10 and the latest Rstudio preview. This was actually the case already 10 years ago when I started using Rstudio, I had to switch to fully local files instead. Now I switched back to using an automatically backed up network drive and the problem is still there.
Rstudio is installed on the local drive but the Rstudio project residing in the network drive. Basically, with a VPN on everything (opening Rstudio, switching projects, opening files, running code) works so slowly that it is basically impossible to work.
With VPN off, working offline using synced files everything works normally.
I have also encountered the same issue with one virtual machine environment where the log-in requires VPN connection, so there working offline and syncing later is not an option. In this case I also disabled all autosave and diagnostics options, as I though that perhaps constant autosaving over network slows things down, but this did not have an effect.
I haven't raised this issue earlier as I guess it could be an issue with the cisco anyconnect or due to my employer's VPN bandwidth settings or something like that. Everything else works fine though outside Rstudio.
Hi, I've been having a similar problem with sluggish performance on a network drive (slow initialisation of a project, slow execution times of lines of code, slow opening and saving of files) when connected from home over my company's VPN and I'm trying to work with my company's IT to find a solution.
Disabling diagnostics did help with slow execution of script lines. Which seems to be down to 'lint_r_source_document' and 'check_for_external_edit' taking much longer to complete on a script saved on a network drive than locally. I assume these processes are checking the script directly on the network directory?
I've tested this by opening Rstudio (not a project) locally on my laptop and opening a local script and script on a network drive. If I run a line from the local script (string1 <- 'string') and the network script (string2 <- 'string') the network script takes significantly longer to execute than the local script because of the 'lint_r_' and 'check_for' processes when diagnostics are on. So I was wondering why 'lint_r_source_document' and 'check_for_external_edit' run every time you run a line from a script?
I'm still getting slowdowns when opening a project on the network even with diagnostics, packages pane and save history off (and basically anything else I could disable/turn off). So I assume there other processes that will communicate to files on the drive when opening a project that is saved on a network drive that could be causing other slowdowns? And as all the problems seem to occur (when I assume) data is being transferred from the network, is it possible this is all just a VPN issue throttling Rstudio?
I'm having a similar issue as well. I am on a work computer over a VPN. I have been testing different configurations to try and isolate the problem. Initially, my project directory was located on a network drive.
I cloned my repo to a local directory and disconnected from the internet. The RStudio and the project load without issue from the local version.
If I connect to my network, but do not connect to the VPN. I am able to load the local project in RStudio (but obviously this is a security issue)
If I then connect to the VPN, RStudio hangs at the loading screen indefinitely while trying to load the local project.
When connected to the VPN, I can open RStudio without a project. If I then try to open the local project, it hangs indefinitely.
If I let it go long enough (maybe 10-20 min), the GUI will appear, but the console is busy and never initializes (I've let it run for hours to no avail)
This is with RStudio Version 2024.04.0+735 and R 4.3.2 (x86_64-w64-mingw32/x64 (64-bit)) (but I also tried with 4.4.0 and the behavior seemed to be the same)
I can try to provide any other information that could be helpful for diagnosing the issue, but I'm not really sure where to find that.
@brianperdomo: There has been a recent update with the latest daily build (see #14619). Might be worth installing the latest daily build and moving the .RProj.user folder to your local drive via the described method in #14619. To me this led to a quite substantial speedup in chunk execution times.
I'm having this issue with the current version of Rstudio 2024.12.0 build 467 but even worse. In most cases I can't even get rstudio to open a project on a network drive, I just keep getting the cannot connect to R error. This is on windows 11 and R 4.4.1.
Rstudio works fine for local projects but most of my projects have to stay on network drives. I've tried copying projects to my local drive and the same project that fails on the network is fine on the local drive.
If I try to open Rstudio by double clicking the .Rproj file then I get the cannot connect to R error. If I try to open Rstudio through the start menu it is fine but if I then try to open a project on the network drive I get the connection issue again. If I delete the .Rproj file in the network directory then I can open Rstudio through the start menu and open individual markdowns on the network drive without any issue, so it seems to be a problem with the project files themselves.
I did try moving the RProj.user folder to my local drive via the described method in #14619 and this had no effect.
One clunky workaround I found is that I can get a project to open by moving all files (except the .Rproj and markdowns) to a subdirectory in the project folder. Everything is still slow but Rstudio will at least start up and I can run analyses. It seems like there is some issue with Rstudio trying to get information on the files in the project directory that is making it freeze. With this approach I can get Rstudio to open and run (slowly) If I move the files to a subdirectory, but if I try to open the subdirectory in the files tab in Rstudio then it freezes again.
I think Box at least is not compatible with git, so I just work somewhere
else and sync with github. Not a great solution for multi-site work (it
adds a lot of unnecessary history to the repo), yet sufficient for my needs.
On Tue, Jan 28, 2025 at 11:02 AM gjmckinney ***@***.***> wrote:
I'm having this issue with the current version of Rstudio 2024.12.0 build
467 but even worse. In most cases I can't even get rstudio to open a
project on a network drive, I just keep getting the cannot connect to R
error. This is on windows 11 and R 4.4.1.
Rstudio works fine for local projects but most of my projects have to stay
on network drives. I've tried copying projects to my local drive and the
same project that fails on the network is fine on the local drive.
If I try to open Rstudio by double clicking the .Rproj file then I get the
cannot connect to R error. If I try to open Rstudio through the start menu
it is fine but if I then try to open a project on the network drive I get
the connection issue again. If I delete the .Rproj file in the network
directory then I can open Rstudio through the start menu and open
individual markdowns on the network drive without any issue, so it seems to
be a problem with the project files themselves.
I did try moving the RProj.user folder to my local drive via the described
method in #14619 <#14619> and
this had no effect.
One clunky workaround I found is that I can get a project to open by
moving all files (except the .Rproj and markdowns) to a subdirectory in the
project folder. Everything is still slow but Rstudio will at least start up
and I can run analyses. It seems like there is some issue with Rstudio
trying to get information on the files in the project directory that is
making it freeze. With this approach I can get Rstudio to open and run
(slowly) If I move the files to a subdirectory, but if I try to open the
subdirectory in the files tab in Rstudio then it freezes again.
—
Reply to this email directly, view it on GitHub
<#10417 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEQXSLLWGII4KU7X563NIL2M6Z2HAVCNFSM6AAAAABWA6UD4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJZGU3TKNBSHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
In my case, I can open R projects on network drives in Windows 11, R version 4.5.0, RStudio version 2024.12.1, but nothing happens when I try to run any code in the console or in code chunks. Even gc() in the console does not execute.
The projects can run on Windows 10 or macOS 15.4.1 from network drives though, so perhaps the issue is to do with Windows 11? I'd be most grateful for any help on this.
I confirm the issue persists for me on the most recent daily build (RStudio 2026.06.0+242 "Blue Plumbago" Release) in Windows 11. It's perhaps not quite as sluggish but it is still sluggish to run even basic commands when the project is located on a network drive. I'd be happy to give whatever diagnostic info would be helpful for troubleshooting.
EDIT: I see you sent a link to Pacific Dogwood. I had tried Blue Plumbago. I'll try Pacific Dogwood now.
Thanks @isaactpetersen! What would help most is a capture of what RStudio is actually doing on the network filesystem. If you're able to grab the following, it would be enormously helpful.
1. A Process Monitor trace (the most useful thing)
Process Monitor (a free Microsoft/Sysinternals tool) records every file operation a program makes, along with how long each one takes -- that will tell us exactly which operations are slow on your network drive.
It will start capturing immediately and show a firehose of events. Press Ctrl+E to stop capturing for a moment, then Ctrl+X to clear what it already collected.
Set up a filter so we only capture the RStudio session process: Filter -> Filter..., then add a rule Process NamecontainsrsessionInclude, click Add, then OK. (Using contains rsession catches both rsession.exe and rsession-utf8.exe, depending on your R build.)
Switch to RStudio with your project open on the network drive. Get it to a quiet/idle state.
Back in Process Monitor, press Ctrl+E to start capturing.
In RStudio, do a small, well-defined action -- e.g. run 1 + 1 in the console a few times, or open a single file. Keep it short (10-20 seconds) so the trace stays manageable.
Press Ctrl+E again to stop capturing.
Save via File -> Save..., choose "All events" and the native PML format, and attach the resulting file here (you may need to zip it). If the file is large, that's fine.
Before saving, it's also handy if you glance at Tools -> File Summary and Tools -> Count Occurrences -> Path -- a screenshot of those sorted by total duration / count often tells the story on its own.
2. A quick A/B test to narrow it down
These take a minute each and help us localize the cost:
With the project open on the network drive, close all editor tabs and run 1 + 1 in the console a few times. Is the console still sluggish, or only when files are open? (This tells us whether per-open-file checks are the culprit.)
Does running code feel slower right after you Alt+Tab back into RStudio from another window, versus when RStudio already had focus?
You mentioned earlier reports of .qmd/.Rmd chunks being far slower than the same code in a plain .R script. If you can reproduce that, a separate short procmon trace while executing one chunk would be great -- that path is different from console execution and we'd like to profile it on its own.
3. Versions / environment
Just so we have it recorded: the exact RStudio build, R version, Windows version, and how the network drive is mounted (mapped drive letter vs. UNC path like \\server\share, and whether you're on a VPN when it's slow).
No rush, and don't worry about getting all of it -- even just the procmon trace from step 1 would give us our first real look at where the time is going.
Activity
ronblum commentedon Jan 26, 2022
@tomtom Thank you for raising this! It's a perfectly good bug—and a clever workaround, though you shouldn't need to do it. You mention that this has been the case for several versions. Was there a version in which this wasn't an issue? What's the most recent version you're using?
tomtom commentedon Jan 27, 2022
mikebessuille commentedon Feb 28, 2022
@tomtom, could you try something for us? If you turn off the packages pane, is RStudio still very slow? Global Options -> Packages -> Enable packages pane (disable it). We suspect if you have a large directory that the IDE is searching recursively through that directory looking for packages. Which would still be a bug, but it would be nice to determine if that's the problem.
tomtom commentedon Mar 1, 2022
No, not really. BTW the project I checked this with contains 1100 files in 180 folders (including git), actual size is 1.62 mb, the size allocated 213.mb.
mikebessuille commentedon Mar 7, 2022
@tomtom, just to clarify, are you saying it's no longer slow if you disable the packages pane? If that's the case that would give us a good clue what's going on. Thanks!
tomtom commentedon Mar 8, 2022
What I meant was: No, I don't really notice any change. I should admit though that I now use Intellij most of the time.
mikebessuille commentedon Mar 14, 2022
Hopefully some of the delay will be improved as we move more information to the database (Spotted Wakerobin). This will need more investigation after that's been done.
helske commentedon Mar 31, 2022
I have the same issue with Windows 10 and the latest Rstudio preview. This was actually the case already 10 years ago when I started using Rstudio, I had to switch to fully local files instead. Now I switched back to using an automatically backed up network drive and the problem is still there.
Rstudio is installed on the local drive but the Rstudio project residing in the network drive. Basically, with a VPN on everything (opening Rstudio, switching projects, opening files, running code) works so slowly that it is basically impossible to work.
With VPN off, working offline using synced files everything works normally.
I have also encountered the same issue with one virtual machine environment where the log-in requires VPN connection, so there working offline and syncing later is not an option. In this case I also disabled all autosave and diagnostics options, as I though that perhaps constant autosaving over network slows things down, but this did not have an effect.
I haven't raised this issue earlier as I guess it could be an issue with the cisco anyconnect or due to my employer's VPN bandwidth settings or something like that. Everything else works fine though outside Rstudio.
benmatthewsed commentedon May 12, 2022
I have been having the same issue (RStudio operating very slowly on a network drive accessed through a work VPN).
I tried the second workaround suggested here (https://stackoverflow.com/questions/61119926/r-studio-incredibly-slow-only-after-i-connect-to-my-work-vpn) - "delete the .Rproj and .Rproj.user folders from the project directory on the server" - which resolved the issue, at the cost of not being able to use all the nice features of projects and
{here}etc.Prior to this I tried turning off the packages pane as suggested above, but this didn't seem to resolve the issue.
(I'm using Windows 10 and RStudio 2021.09.1+372 "Ghost Orchid" Release (8b9ced1, 2021-11-08).)
29 remaining items
IClaydon90 commentedon Jun 3, 2024
Hi, I've been having a similar problem with sluggish performance on a network drive (slow initialisation of a project, slow execution times of lines of code, slow opening and saving of files) when connected from home over my company's VPN and I'm trying to work with my company's IT to find a solution.
Disabling diagnostics did help with slow execution of script lines. Which seems to be down to 'lint_r_source_document' and 'check_for_external_edit' taking much longer to complete on a script saved on a network drive than locally. I assume these processes are checking the script directly on the network directory?
I've tested this by opening Rstudio (not a project) locally on my laptop and opening a local script and script on a network drive. If I run a line from the local script (string1 <- 'string') and the network script (string2 <- 'string') the network script takes significantly longer to execute than the local script because of the 'lint_r_' and 'check_for' processes when diagnostics are on. So I was wondering why 'lint_r_source_document' and 'check_for_external_edit' run every time you run a line from a script?
I'm still getting slowdowns when opening a project on the network even with diagnostics, packages pane and save history off (and basically anything else I could disable/turn off). So I assume there other processes that will communicate to files on the drive when opening a project that is saved on a network drive that could be causing other slowdowns? And as all the problems seem to occur (when I assume) data is being transferred from the network, is it possible this is all just a VPN issue throttling Rstudio?
brianperdomo commentedon Jun 21, 2024
I'm having a similar issue as well. I am on a work computer over a VPN. I have been testing different configurations to try and isolate the problem. Initially, my project directory was located on a network drive.
I cloned my repo to a local directory and disconnected from the internet. The RStudio and the project load without issue from the local version.
If I connect to my network, but do not connect to the VPN. I am able to load the local project in RStudio (but obviously this is a security issue)
If I then connect to the VPN, RStudio hangs at the loading screen indefinitely while trying to load the local project.
When connected to the VPN, I can open RStudio without a project. If I then try to open the local project, it hangs indefinitely.
If I let it go long enough (maybe 10-20 min), the GUI will appear, but the console is busy and never initializes (I've let it run for hours to no avail)
This is with RStudio Version 2024.04.0+735 and R 4.3.2 (x86_64-w64-mingw32/x64 (64-bit)) (but I also tried with 4.4.0 and the behavior seemed to be the same)
I can try to provide any other information that could be helpful for diagnosing the issue, but I'm not really sure where to find that.
marianklose commentedon Jul 1, 2024
@brianperdomo: There has been a recent update with the latest daily build (see #14619). Might be worth installing the latest daily build and moving the .RProj.user folder to your local drive via the described method in #14619. To me this led to a quite substantial speedup in chunk execution times.
ronblum commentedon Jul 3, 2024
@marianklose Thank you for confirming that the solution works!
With the fix, I'm closing the issue, but if the issue persists despite the change, please let us know.
gjmckinney commentedon Jan 28, 2025
I'm having this issue with the current version of Rstudio 2024.12.0 build 467 but even worse. In most cases I can't even get rstudio to open a project on a network drive, I just keep getting the cannot connect to R error. This is on windows 11 and R 4.4.1.
Rstudio works fine for local projects but most of my projects have to stay on network drives. I've tried copying projects to my local drive and the same project that fails on the network is fine on the local drive.
If I try to open Rstudio by double clicking the .Rproj file then I get the cannot connect to R error. If I try to open Rstudio through the start menu it is fine but if I then try to open a project on the network drive I get the connection issue again. If I delete the .Rproj file in the network directory then I can open Rstudio through the start menu and open individual markdowns on the network drive without any issue, so it seems to be a problem with the project files themselves.
I did try moving the RProj.user folder to my local drive via the described method in #14619 and this had no effect.
One clunky workaround I found is that I can get a project to open by moving all files (except the .Rproj and markdowns) to a subdirectory in the project folder. Everything is still slow but Rstudio will at least start up and I can run analyses. It seems like there is some issue with Rstudio trying to get information on the files in the project directory that is making it freeze. With this approach I can get Rstudio to open and run (slowly) If I move the files to a subdirectory, but if I try to open the subdirectory in the files tab in Rstudio then it freezes again.
thk686 commentedon Jan 28, 2025
nehawali21 commentedon May 2, 2025
In my case, I can open R projects on network drives in Windows 11, R version 4.5.0, RStudio version 2024.12.1, but nothing happens when I try to run any code in the console or in code chunks. Even
gc()in the console does not execute.The projects can run on Windows 10 or macOS 15.4.1 from network drives though, so perhaps the issue is to do with Windows 11? I'd be most grateful for any help on this.
rasmusrhl commentedon Jan 13, 2026
Disabling packages pane fixed this. (I have the entire CRAN installed)
isaactpetersen commentedon Jun 24, 2026
The issue persists for me even on the latest version of Rstudio (RStudio 2026.05.1) on Windows 11.
kevinushey commentedon Jun 24, 2026
Any better in the daily builds available from https://dailies.rstudio.com/rstudio/pacific-dogwood/?
isaactpetersen commentedon Jun 24, 2026
I confirm the issue persists for me on the most recent daily build (RStudio 2026.06.0+242 "Blue Plumbago" Release) in Windows 11. It's perhaps not quite as sluggish but it is still sluggish to run even basic commands when the project is located on a network drive. I'd be happy to give whatever diagnostic info would be helpful for troubleshooting.
EDIT: I see you sent a link to Pacific Dogwood. I had tried Blue Plumbago. I'll try Pacific Dogwood now.
kevinushey commentedon Jun 24, 2026
Thanks @isaactpetersen! What would help most is a capture of what RStudio is actually doing on the network filesystem. If you're able to grab the following, it would be enormously helpful.
1. A Process Monitor trace (the most useful thing)
Process Monitor (a free Microsoft/Sysinternals tool) records every file operation a program makes, along with how long each one takes -- that will tell us exactly which operations are slow on your network drive.
Procmon.exe.Process NamecontainsrsessionInclude, click Add, then OK. (Usingcontains rsessioncatches bothrsession.exeandrsession-utf8.exe, depending on your R build.)1 + 1in the console a few times, or open a single file. Keep it short (10-20 seconds) so the trace stays manageable.Before saving, it's also handy if you glance at Tools -> File Summary and Tools -> Count Occurrences -> Path -- a screenshot of those sorted by total duration / count often tells the story on its own.
2. A quick A/B test to narrow it down
These take a minute each and help us localize the cost:
1 + 1in the console a few times. Is the console still sluggish, or only when files are open? (This tells us whether per-open-file checks are the culprit.).qmd/.Rmdchunks being far slower than the same code in a plain.Rscript. If you can reproduce that, a separate short procmon trace while executing one chunk would be great -- that path is different from console execution and we'd like to profile it on its own.3. Versions / environment
Just so we have it recorded: the exact RStudio build, R version, Windows version, and how the network drive is mounted (mapped drive letter vs. UNC path like
\\server\share, and whether you're on a VPN when it's slow).No rush, and don't worry about getting all of it -- even just the procmon trace from step 1 would give us our first real look at where the time is going.
address PR review feedback for remote filesystem reduction
reduce background file operations for projects on remote filesystems (#…