Rstudio server extremely slow when .git file is present

Hello,

I have noticed that with all my projects with a .git in the project folder, Rstudio is extremely slow - it will take minutes to become operational; visualising the content of the different windows or executing simple commands in console. If I remove the .git file and reload the project, it goes back to normal.

Thanks
Francesci

Ubuntu 18.04.3 LTS

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

RStudio version 1.2.5019 (Elderflower)

Hi @francesco

I'm on a 19.10 derivative, which should make no never mind, but don't have that problem.

Could you check to see that .git is a directory and not a file?

Are other git actions in that directory similarly slow? What happens if you try to run

git status

from the terminal in that project directory?

You can also try running:

Sys.setenv(RSTUDIO_GIT_LOG = "1")

to see what git actions RStudio is taking behind the scenes, to see which of those in particular are slow (if that is indeed the case).

1 Like

Yes, that's probably the problem. All git operations are extremely slow (I have large files manage with LFS) and sync with a Gitlab repo. Any idea on how to speed it up?

.git is a folder. Why does it matter?

1 Like

Simply because it should be a folder. If it were a file, instead, RStudio might have been churning trying to treat it as a directory with subdirectories and files in standard places and crumping when they weren't there.

Unfortunately, I think the only option currently would be to disable RStudio's git integration.

You might consider filing this as a feature request at https://github.com/rstudio/rstudio/issues -- RStudio could better handle cases like this.

2 Likes