Re: git status: small difference between stating whole repository and small subdirectory
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Feb 15, 2012, 11:01 UTC
- Message-ID
- <CACsJy8DBG2A91=ppCOC6Hf6aYM2soUXXdsY0GU9hr2xqjj4RYA@mail.gmail.com>
- In-Reply-To
- <CAA01Cso_8=159UDMFUHiYz1X=gYtpbqRO4h3TMw7N=4YMV8YNg@mail.gmail.com>
On Wed, Feb 15, 2012 at 3:57 PM, Piotr Krukowiecki <piotr.krukowiecki@gmail.com> wrote:
Show 7 quoted lines
> Indeed, after gc the times went down: > 10s -> 2.3s (subdirectory) > 17s -> 9.5s (whole repo) > > 2 seconds is much better and I'd say acceptable for me. But my questions are: > - why is it so slow with not packed repo? > - can it be faster without repacking?
gc does more than just repacking. If you still have the un-gc'd repo, Try these commands one by one, and time "git status" after each:
- git pack-refs --all --prune - git reflog expire --all - git repack -d -l - git prune --expire - git rerere gc
I'd be more interested in why auto-gc does not kick in (or whther it should).
> - even with packed repo, the time on small subdirectory is much higher > than I'd expect given time on whole repo and subdirectory size - why?
Hard to say without measuring. I just notice that I missed your mail with profiling results. I will have a look, but just in case, is the repository publicly available?
-- Duy