# git-gui: How to configure for use in gigantic projects?

5 messages from 2020-10-30 to 2020-10-30. Participants: Birger Skogeng Pedersen, Konstantin Tokarev, Pratyush Yadav, Marc Branchaud.
Thread: https://gitlist.dev/t/54534

## Birger Skogeng Pedersen, 2020-10-30 10:16

Subject: git-gui: How to configure for use in gigantic projects?
Message-ID: <CAGr--=KpNaPFjMOzXzF382cv1p58nMoOPXAm0MCdA8WZMBznVA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3DKpNaPFjMOzXzF382cv1p58nMoOPXAm0MCdA8WZMBznVA%40mail.gmail.com

```
Hi,

I would like to use git gui for a project. The problem is that the
repository directory is really gigantic. Doing a scan (F5) takes a
couple of minutes to finish.

I would like the scan to only focus on files that are specifically
added to the index. In git I do this:

git config status.showUntrackedFiles no

git status will then only show status of files that I have
specifically added. So git status completion is instant.

But this configuration appears to have no effect on git-gui. The scan
is just as slow as before.

Anything I can do to make git-gui only scan files that are
specifically added, and not look through the whole directory?

```

## Konstantin Tokarev, 2020-10-30 10:30

Subject: Re: git-gui: How to configure for use in gigantic projects?
Message-ID: <445251604053314@mail.yandex.ru>
URL: https://gitlist.dev/e/445251604053314%40mail.yandex.ru
In-Reply-To: <CAGr--=KpNaPFjMOzXzF382cv1p58nMoOPXAm0MCdA8WZMBznVA@mail.gmail.com>

```


30.10.2020, 13:16, "Birger Skogeng Pedersen" <birger.sp@gmail.com>:
> Hi,
>
> I would like to use git gui for a project. The problem is that the
> repository directory is really gigantic. Doing a scan (F5) takes a
> couple of minutes to finish.
>
> I would like the scan to only focus on files that are specifically
> added to the index. In git I do this:
>
> git config status.showUntrackedFiles no
>
> git status will then only show status of files that I have
> specifically added. So git status completion is instant.
>
> But this configuration appears to have no effect on git-gui. The scan
> is just as slow as before.
>
> Anything I can do to make git-gui only scan files that are
> specifically added, and not look through the whole directory?

FWIW, there are better ways to improve performance of git status without
hiding untracked files (which are useful to see when new files are added):

* Add all uninteresting files and directories to .gitignore
* Use fast storage for git repository, e.g. NVME-based
* If your OS can handle filesystem cache efficiently (e.g., Linux) make sure 
there is enough of free RAM for caches and all repeated operations on
same files and directories will speed up dramatically
* If your OS cannot handle filesystem cache efficiently (e.g. Windows) consider
using different OS for development
* If overall performance is still not sufficient, consider using fsmonitor hook [1]

[1] https://github.blog/2018-04-05-git-217-released/#speeding-up-status-with-watchman



-- 
Regards,
Konstantin

```

## Pratyush Yadav, 2020-10-30 10:58

Subject: Re: git-gui: How to configure for use in gigantic projects?
Message-ID: <20201030105856.ctjkxxwmudaeewpa@yadavpratyush.com>
URL: https://gitlist.dev/e/20201030105856.ctjkxxwmudaeewpa%40yadavpratyush.com
In-Reply-To: <CAGr--=KpNaPFjMOzXzF382cv1p58nMoOPXAm0MCdA8WZMBznVA@mail.gmail.com>

```
Hi Birger,

On 30/10/20 11:16AM, Birger Skogeng Pedersen wrote:
> Hi,
> 
> I would like to use git gui for a project. The problem is that the
> repository directory is really gigantic. Doing a scan (F5) takes a
> couple of minutes to finish.
> 
> I would like the scan to only focus on files that are specifically
> added to the index. In git I do this:
> 
> git config status.showUntrackedFiles no
> 
> git status will then only show status of files that I have
> specifically added. So git status completion is instant.
> 
> But this configuration appears to have no effect on git-gui. The scan
> is just as slow as before.
> 
> Anything I can do to make git-gui only scan files that are
> specifically added, and not look through the whole directory?

Uncheck "Show untracked files" in options. It is controlled by the 
config 'gui.displayuntracked'.

-- 
Regards,
Pratyush Yadav

```

## Birger Skogeng Pedersen, 2020-10-30 11:11

Subject: Re: git-gui: How to configure for use in gigantic projects?
Message-ID: <CAGr--=KTbc7zBaYavFPafXjEGT5PJC6UXw7cmW-fSgXpQagKFw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGr--%3DKTbc7zBaYavFPafXjEGT5PJC6UXw7cmW-fSgXpQagKFw%40mail.gmail.com
In-Reply-To: <20201030105856.ctjkxxwmudaeewpa@yadavpratyush.com>

```
Ah, that one changed everything! Thank you Pratyush!

On Fri, Oct 30, 2020 at 11:59 AM Pratyush Yadav <me@yadavpratyush.com> wrote:
>
> Hi Birger,
>
> On 30/10/20 11:16AM, Birger Skogeng Pedersen wrote:
> > Hi,
> >
> > I would like to use git gui for a project. The problem is that the
> > repository directory is really gigantic. Doing a scan (F5) takes a
> > couple of minutes to finish.
> >
> > I would like the scan to only focus on files that are specifically
> > added to the index. In git I do this:
> >
> > git config status.showUntrackedFiles no
> >
> > git status will then only show status of files that I have
> > specifically added. So git status completion is instant.
> >
> > But this configuration appears to have no effect on git-gui. The scan
> > is just as slow as before.
> >
> > Anything I can do to make git-gui only scan files that are
> > specifically added, and not look through the whole directory?
>
> Uncheck "Show untracked files" in options. It is controlled by the
> config 'gui.displayuntracked'.
>
> --
> Regards,
> Pratyush Yadav

```

## Marc Branchaud, 2020-10-30 14:06

Subject: Re: git-gui: How to configure for use in gigantic projects?
Message-ID: <dc3de1d7-43b2-20da-5e68-2652b35ce784@xiplink.com>
URL: https://gitlist.dev/e/dc3de1d7-43b2-20da-5e68-2652b35ce784%40xiplink.com
In-Reply-To: <CAGr--=KpNaPFjMOzXzF382cv1p58nMoOPXAm0MCdA8WZMBznVA@mail.gmail.com>

```
On 2020-10-30 6:16 a.m., Birger Skogeng Pedersen wrote:
> Hi,
> 
> I would like to use git gui for a project. The problem is that the
> repository directory is really gigantic. Doing a scan (F5) takes a
> couple of minutes to finish.

I've found that enabling Trust File Modification Time helps, at the cost 
of git-gui doing (very) occasional rescans when it notices that a file 
it thought was modified turns out to be unmodified.  As Konstantin said, 
things generally improve once the initial scan primes the disk cache.  YMMV.

The setting is in the Preferences, or "git config gui.trustmtime true".

		M.


```
