# behaviour of untracked files cache in git stable 2.36.1 verison on mac

1 messages from 2022-06-10 to 2022-06-10. Participants: Piyush Gaikwad.
Thread: https://gitlist.dev/t/57980

## Piyush Gaikwad, 2022-06-10 02:52

Subject: behaviour of untracked files cache in git stable 2.36.1 verison on mac
Message-ID: <CABsvAmr0-1eLQeCR-hhz_CObOS2bgjRf7v+YG5BOY8h5nn+2kQ@mail.gmail.com>
URL: https://gitlist.dev/e/CABsvAmr0-1eLQeCR-hhz_CObOS2bgjRf7v%2BYG5BOY8h5nn%2B2kQ%40mail.gmail.com

```
Hello all,

I am currently on Mac.
In Git 2.35.1, when I cloned my repository, it took 7 seconds to
enumerate the untracked files and when I did time git status, it took
approximately 2 seconds. And, when I checkout to another branch it
took approximately 15 seconds and when I checkout back to my main repo
git status took 15 seconds (which should not take this much time).
Work-around for this in (2.35.1) was: I set core.untrackedcache=true
and GIT_FORCE_UNTRACKEDCACHE=1 which helped to update the
untrackedcache and improve the performance of git status of
(approximately 4 seconds).

But now in Git 2.36.1, this work-around doesn't seem to work. It takes
approximately 20 seconds on all branches.

Possible changes in the code:
In Git 2.35.1, code in dir.c: GIT_FORCE_UNTRACKED_CACHE,0
and the same in Git 2.36.1, code in dir.c:GIT_FORCE_UNTRACKED_CACHE, -1

Is this code change which made the git config variables unfit for the
current stable version or is it something else?
How can I solve this untracked files cache performance issue; is there
any workaround?

```
