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

Re: speeding up cg-log -u

From
Petr Baudis <pasky@ucw.cz>
Date
May 14, 2005, 10:39 UTC
Message-ID
<20050514103937.GA3905@pasky.ji.cz>
In-Reply-To
<7vu0l62l27.fsf@assigned-by-dhcp.cox.net>

Dear diary, on Sat, May 14, 2005 at 08:19:14AM CEST, I got a letter where Zack Brown <zbrown@tumblerings.org> told me that...

> Currently cg-log handles this by grabbing all the log data from git, and
> then grepping through it.

Which is clearly suboptimal since cg-log now does git-cat-file up to _three_ times per commit. It should instead process the commit only once.

Dear diary, on Sat, May 14, 2005 at 11:50:24AM CEST, I got a letter where Junio C Hamano <junkio@cox.net> told me that...

> +	buffer = read_sha1_file(item->object.sha1, type, &size);

If it do that, I wonder how much speedup would be using this instead. But probably still significant one.

What I don't like is that it searches only the author field. I find the behaviour that it searches in the committer field as well very useful, since I can easily check whose patches on a file I checked it - that's useful when porting own stuff to another branch, or frequently it's the only thing I actually remember. :-)

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor
Previous: Junio C HamanoNext: Petr Baudis
Message 4 of 14 in “speeding up cg-log -u”
  1. Zack BrownMay 14, 2005
  2. Junio C HamanoMay 14, 2005
  3. Add --author match to git-rev-list and git-rev-tree.Junio C Hamano, May 14, 2005
  4. Petr BaudisMay 14, 2005
  5. Petr BaudisMay 14, 2005
  6. Junio C HamanoMay 14, 2005
  7. Zack BrownMay 14, 2005
  8. Petr BaudisMay 14, 2005
  9. Daniel BarkalowMay 15, 2005
  10. Junio C HamanoMay 16, 2005
  11. Daniel BarkalowMay 16, 2005
  12. Zack BrownMay 14, 2005
  13. Petr BaudisMay 14, 2005
  14. Zack BrownMay 14, 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.