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

Re: Use a *real* built-in diff generator

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Mar 25, 2006, 09:35 UTC
Message-ID
<e5bfff550603250135h42b0da62x84973483798d969c@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0603241938510.15714@g5.osdl.org>
On 3/25/06, Linus Torvalds <torvalds@osdl.org> wrote:
Show 22 quoted lines
>
> This uses a simplified libxdiff setup to generate unified diffs _without_
> doing  fork/execve of GNU "diff".
>
> This has several huge advantages, for example:
>
> Before:
>
>         [torvalds@g5 linux]$ time git diff v2.6.16.. > /dev/null
>
>         real    0m24.818s
>         user    0m13.332s
>         sys     0m8.664s
>
> After:
>
>         [torvalds@g5 linux]$ time git diff v2.6.16.. > /dev/null
>
>         real    0m4.563s
>         user    0m2.944s
>         sys     0m1.580s
>

Currently 'getting the diffs' is the second most important time consumer of annotation calculation (just after getting the file history). On big and heavily modified files, as drivers/net/tg3.c in Linux tree, this can be very slow (around 10s on my box).

The profiling has been done on qgit, but I think it is of general interest because qgit uses git-rev-list and git-diff-tree -p to get file's history and diffs respectively.

So this patch is more then welcomed!  Thanks!
Marco
Previous: Davide LibenziNext: Alex Riesen
Message 6 of 22 in “Use a *real* built-in diff generator”
  1. Linus TorvaldsMar 25, 2006
  2. Junio C HamanoMar 25, 2006
  3. Junio C HamanoMar 25, 2006
  4. Linus TorvaldsMar 25, 2006
  5. Davide LibenziMar 25, 2006
  6. Marco CostalbaMar 25, 2006
  7. Alex RiesenMar 25, 2006
  8. Linus TorvaldsMar 25, 2006
  9. Morten WelinderMar 25, 2006
  10. Linus TorvaldsMar 25, 2006
  11. Linus TorvaldsMar 25, 2006
  12. Davide LibenziMar 25, 2006
  13. Linus TorvaldsMar 25, 2006
  14. Davide LibenziMar 26, 2006
  15. Ralf BaechleMar 26, 2006
  16. Petr BaudisMar 26, 2006
  17. Linus TorvaldsMar 25, 2006
  18. Davide LibenziMar 26, 2006
  19. Junio C HamanoMar 25, 2006
  20. Junio C HamanoMar 25, 2006
  21. Linus TorvaldsMar 25, 2006
  22. Linus TorvaldsMar 25, 2006

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.