git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
APAndy Parkins <andyparkins@gmail.com>
Date
May 20, 2010, 17:45 UTC
Message-ID
<ht3sda$cvo$1@dough.gmane.org>
In-Reply-To
<4BF55ACD.3060009@drmicha.warpmail.net>
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
andyparkins@gmail.com
Previous: Michael J GruberNext: Jens Lehmann
Message 5 of 16 in “git-status and git-diff now very slow in project with a submodule”
  1. Andy ParkinsMay 20, 2010
  2. Stefan NaeweMay 20, 2010
  3. Andy ParkinsMay 20, 2010
  4. Michael J GruberMay 20, 2010
  5. Andy ParkinsMay 20, 2010
  6. Jens LehmannMay 20, 2010
  7. Andy ParkinsMay 20, 2010
  8. Nguyen Thai Ngoc DuyMay 21, 2010
  9. Junio C HamanoMay 20, 2010
  10. Andy ParkinsMay 20, 2010
  11. Junio C HamanoMay 20, 2010
  12. Jens LehmannMay 21, 2010
  13. Leo RazoumovMay 21, 2010
  14. Andreas SchwabMay 21, 2010
  15. Jens LehmannMay 22, 2010
  16. Jens LehmannMay 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.