Subject: Re: git-status and git-diff now very slow in project with a submodule

From: Andy Parkins <[email-masked]>
Date: Thu, 20 May 2010 18:45:48 +0100

Michael J Gruber wrote:

> You see: No submodule summary here!
> Try setting the variable to true and see the difference. False is the
> default.

Quite so; I hadn't understood submodulesummary -- I just tried it when it 
was suggested.

> Git needs to check the submodule in order to produce the "modified" line
> even when no summary is required. Stopping Git from looking at the

I realise that -- what I was after is a return to the old behaviour -- under 
the control of an option.

> submodule at all is impossible, I think. One could only hope that it
> stops scanning after the first modification.

"Impossible" is a strong word for a behaviour that existed pre-1.7.

It's not that I want git not to look at the submodule at all; in fact it 
certainly should for those cases when the submodule commit has changed, and 
I guess that a check for a dirty index is pretty quick too; but scanning the 
whole submodule tree (which it has to do to find if anything was modified, 
even when nothing was modified) is a lot of extra time when the submodule is 
large.  That extra time is inconvenient when you're working on a small 
project that makes use of a large project as a submodule.  (Most of my 
personal use of submodule is embedding large projects that I want to be able 
to guarantee are at a particular version, but I don't really change them)

Andy

-- 
Dr Andy Parkins
[email-masked]