Allow disabling the git plugin with a kdevgit.disabled git config option
AbandonedPublic

Authored by arichardson on Apr 13 2017, 11:25 AM.

Details

Reviewers
mwolff
kfunk
Summary

It can get very slow when used on big projects and this allows me to
selectively disable for those projects.


Second commit:

Disable git plugin for remote paths

It won't work with e.g. an sftp:// URL

Diff Detail

Repository
R33 KDevPlatform
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
arichardson created this revision.Apr 13 2017, 11:25 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptApr 13 2017, 11:25 AM
mwolff requested changes to this revision.Apr 13 2017, 1:55 PM

can we first profile it and see if we can speed it up instead of applying such a (imo) nasty workaround?

This revision now requires changes to proceed.Apr 13 2017, 1:55 PM
arichardson added a comment.EditedApr 13 2017, 3:10 PM

I don't think theres much point in profiling. It works fine for most repositories, it just gets bad with really big ones. The underlying issue is that running e.g. git status/git diff can be extremely slow.

E.g. I have the following in my local git config to make the bash prompt usable:

[bash]
        showUntrackedFiles = false
        showDirtyState = false

I am using this for https://github.com/CTSRD-CHERI/cheribsd (a fork of FreeBSD) so it's a quite large repository. I also sometimes open projects in NFS mounted folders and there it becomes really slow.

arichardson abandoned this revision.Oct 24 2017, 8:15 AM

I guess just disabling the git plugin is also a suitable workaround.

kfunk added a comment.Oct 24 2017, 8:58 AM

@mwolff Hmm, I think this feature could be useful at times. Being able to disable the Git plugin on a per-repo basis (and stored in Git's very own settings) sounds useful to me.

You don't think this should go in at all?

It completely invisible to new users, I doubt it would be used much. Maybe instead we should honor the bash settings, if the issue is that we are running stat in the background? If the user explicitly runs a git command, we'd still block but that's OK as he asked for it?