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

Re: how to speed up "git log"?

From
Shawn O. Pearce <spearce@spearce.org>
Date
Feb 12, 2007, 06:06 UTC
Message-ID
<20070212060641.GC699@spearce.org>
In-Reply-To
<7vmz3kaugq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 9 quoted lines
> I doubt it -- sliding mmap() in the current git, while is a good
> change overall for handling really huge repos, would most likely
> perform poorer than the fixed mmap() in 1.4.4 series on
> platforms with slow mmap(), most notably on MacOS X.
> 
> It _might_ be possible that turning some sliding mmap() calls
> into pread() makes it perform better on MacOS X.
> 
> I wonder what happens it git is compiled with NO_MMAP there...

So I ran three trials, v1.5.0-rc4-26-gcc46a74 with and without NO_MMAP against v1.4.4.4 on a freshly repacked git.git.

v150-mmap:
        3.33 real         3.12 user         0.05 sys
        3.32 real         3.12 user         0.05 sys
        3.34 real         3.12 user         0.05 sys
v150-nommap:
        3.46 real         3.13 user         0.16 sys
        3.43 real         3.13 user         0.16 sys
        3.46 real         3.13 user         0.16 sys
v1444-mmap:
        3.30 real         3.09 user         0.05 sys
        3.30 real         3.09 user         0.05 sys
        3.25 real         3.09 user         0.04 sys

CFLAGS="-O2"; the above timings are three representative samples out of 10 runs each, all hot cache.

Clearly the sliding mmap window isn't hurting us in this case by very much, and NO_MMAP really isn't helping matters at all.

-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 12 of 23 in “how to speed up "git log"?”
  1. Bruno HaibleFeb 11, 2007
  2. Johannes SchindelinFeb 11, 2007
  3. Shawn O. PearceFeb 11, 2007
  4. Johannes SchindelinFeb 11, 2007
  5. Bruno HaibleFeb 11, 2007
  6. Shawn O. PearceFeb 11, 2007
  7. Johannes SchindelinFeb 11, 2007
  8. Robin RosenbergFeb 11, 2007
  9. Bruno HaibleFeb 12, 2007
  10. Johannes SchindelinFeb 12, 2007
  11. Junio C HamanoFeb 12, 2007
  12. Shawn O. PearceFeb 12, 2007
  13. Junio C HamanoFeb 12, 2007
  14. Shawn O. PearceFeb 12, 2007
  15. Shawn O. PearceFeb 12, 2007
  16. Linus TorvaldsFeb 12, 2007
  17. Bruno HaibleFeb 12, 2007
  18. Bruno HaibleFeb 11, 2007
  19. Bruno HaibleFeb 17, 2007
  20. Johannes SchindelinFeb 17, 2007
  21. Bruno HaibleFeb 18, 2007
  22. Johannes SchindelinFeb 18, 2007
  23. Shawn O. PearceFeb 18, 2007

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.