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
Jens Lehmann <jens.lehmann@web.de>
Date
May 21, 2010, 12:05 UTC
Message-ID
<4BF67710.30805@web.de>
In-Reply-To
<7vbpca6uxi.fsf@alter.siamese.dyndns.org>
Am 21.05.2010 00:59, schrieb Junio C Hamano:
Show 6 quoted lines
> At least we should be able to let the users say, with "git status -uno",
> "I don't care about untracked and unignored paths; I don't make such a
> mistake to forget adding new paths", and optimize the scanning of
> submodule directories taking advantage of that statement.  Is there a
> fundamental reason why things shouldn't work that way, or is it just a
> bug in the current code?

It works that way since 3bfc450. "git status" (and the diff family when comparing against the work tree) forks a "git status" for each submodule that is populated. If the status command in the superproject is started with "-uno" the same option is used for the "git status" forked in the populated submodules, so no checking for untracked files is done in that case.

But that doesn't speed up that process much, as the tracked files inside the submodules have to be checked for modifications anyway, no matter if "-uno" is used or not. Getting rid of the fork of a new "git status" by using an alternate odb is on my to do list. Apart from gaining some time by avoiding the fork (which is a per-submodule-constant) we could terminate early in case we find a modification (instead of continuing as the current approach does). But only dirty submodules would profit from that, a clean submodule won't be scanned much faster that way AFAICS.

Previous: Junio C HamanoNext: Leo Razoumov
Message 12 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.