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

Re: Is cogito really this inefficient

From
RKRussell King <rmk@arm.linux.org.uk>
Date
Jul 14, 2005, 09:59 UTC
Message-ID
<20050714105938.A31383@flint.arm.linux.org.uk>
In-Reply-To
<tnxu0ixoiuo.fsf@arm.com>
On Thu, Jul 14, 2005 at 10:08:31AM +0100, Catalin Marinas wrote:
Show 9 quoted lines
> Russell King <rmk@arm.linux.org.uk> wrote:
> > it appears that cg-diff does a
> >
> > 	git-update-cache --refresh >/dev/null
> >
> > each time it's run, which is taking the bulk of the time.  Also note
> > that curiously, it exits with status 1.
> 
> Does git-ls-files --unmerged show any files?
No, and it returns fairly quickly:

$ /usr/bin/time git-ls-files --unmerged 0.29user 0.03system 0:00.43elapsed 73%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+655minor)pagefaults 0swaps

Actually, I should've left the sh -x /usr/bin/cg-diff drivers/serial/8250.c running a little longer. It's not the git-update-cache command which is taking the time, it's git-diff-cache.

Running the diff several times, both with and without changes to drivers/serial/8250.c, it seems that sometimes it's faster. I guess it has to do with dentry invalidation...

However, the point is - I've only asked for _one_ file. Why do we need to look at _every_ file in the tree?

I could understand this behaviour if I'd asked for a diff across the whole tree, but I didn't.

Internally, the sha1 of the unmodified drivers/serial/8250.c should be known, so should be trivial to unpack that and generate a diff. Given the cache, this should be something which should be lightning fast when the requested fileset to diff is already known.

-- 
Russell King
Previous: Catalin MarinasNext: Linus Torvalds
Message 7 of 13 in “Is cogito really this inefficient”
  1. Russell KingJul 13, 2005
  2. Matthias UrlichsJul 13, 2005
  3. Russell KingJul 14, 2005
  4. Linus TorvaldsJul 13, 2005
  5. Russell KingJul 14, 2005
  6. Catalin MarinasJul 14, 2005
  7. Russell KingJul 14, 2005
  8. Linus TorvaldsJul 14, 2005
  9. Linus TorvaldsJul 15, 2005
  10. Junio C HamanoJul 15, 2005
  11. Russell KingJul 15, 2005
  12. Linus TorvaldsJul 14, 2005
  13. Petr BaudisJul 19, 2005

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.