Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Be able to control how often the git scan takes place #4368

Open
shrektan opened this issue Feb 27, 2019 · 10 comments

Comments

@shrektan
Copy link

commented Feb 27, 2019

Hi,

I'm currently maintaining a large project with multiple git submodules inside. However, when using RStudio on this project, the git and file control panels respond very slow.

I suspect it's because RStudio is somehow running git re-scan whenever a file gets touched. After I closed the version control function, RStudio works in "normal" speed now on this project.

It's a pain to tolerate the slow respond. So I'm asking if RStudio can add an option regarding to the git scan frequencies . To my case, I will be happy even if I have to trigger the git scan manually (that's what the native git GUI does). Otherwise, I have to turn off RStudio version control and run the git GUI there... I prefer stays everything inside of RStudio...

Thanks!

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Feb 27, 2019

Are you using a preview release of RStudio? If so, you can execute:

Sys.setenv(RSTUDIO_GIT_LOG = "1")

to have RStudio dump all the git-related actions it's taking into the console. Do you see the lag occurring with any action in particular?

Note that RStudio doesn't poll the filesystem for changes; it registers file monitors to request a refresh when files within the project change, and also when the RStudio window gains focus.

@shrektan

This comment has been minimized.

Copy link
Author

commented Feb 28, 2019

@kevinushey Thanks for the help.

Yes, I can see the the action log of git, when I modify the file, click the folder, click the git history... And whenever RStudio GUI gets the focus...

After a few trials, C:/app/Git/bin/git.exe status -z --porcelain -- C:/my-work-directory seems quite slow. It gets called a lot and every time it takes about 3 seconds, even if I hasn't touched any file.

Maybe it's due to the multiple submodules because git status runs quite slow on the terminal as well...

@shrektan

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

Actually, it runs very fast on my Mac. Highly probably due to the anti-virus software on the computer in the office (the Windows 10 OS may also be the cause). Anyway, since I cannot turn off the anti-virus, being able to close the Git auto-scan will help a lot on my case... Thanks.

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

https://community.rstudio.com/t/rstudio-suddenly-slow-processing/4959/9 might be relevant: some users found that adding certain processes to the set of Windows Defender Exclusions helps.

@shrektan

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

Thanks for the tips but it doesn't help. I bet my antivirus (TrendMicro) is still scanning those processes. Unluckily, I don't have the authorization to add processes into the TrendMicro's white lists so can't test that...

@kevinushey kevinushey added this to the v1.3 milestone Mar 1, 2019

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

I realize this is a heavy hammer to use, but does disabling the RStudio git integration altogether make a difference?

screen shot 2019-03-01 at 10 24 36 am

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

Or, if the problem only occurs with one particular project, you can disable it for that project only:

screen shot 2019-03-01 at 10 25 21 am

@shrektan

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

Thanks for the help.

I’ve tried that before and I can confirm that RStudio speed goes back to normal. The thing is it will better if there’s could be an option... so that I can enjoy the nice Git GUI RStudio provides...

It’s not only for this project... Even on small projects, it’s not very smooth because of (probably) Git being monitored by antivirus and frequently called by RStudio IDE...

That’s why I submit this FR... to see if there’s a chance to have the option that disable Git auto-scan globally or on single project...

@kevinushey

This comment has been minimized.

Copy link
Contributor

commented Mar 1, 2019

Gotcha. Unfortunately we're trying to wrap up the v1.2 release but we'll try to make sure this happens for v1.3 (we're planning that v1.3 will be a quicker release than v1.2 was)

@shrektan

This comment has been minimized.

Copy link
Author

commented Mar 1, 2019

Thanks! Looking forward to that.

@ronblum ronblum added the enhancement label Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.