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

Re: [PATCH 1/2] blame: large-scale performance rewrite

From
David Kastrup <dak@gnu.org>
Date
Apr 26, 2014, 17:02 UTC
Message-ID
<87d2g481nb.fsf@fencepost.gnu.org>
In-Reply-To
<CAJo=hJs=ap=Ct_PzOsO=vHmDVMvUF+nvbB7b67bgnmug+Yrohg@mail.gmail.com>
Shawn Pearce <spearce@spearce.org> writes:
> Thanks for doing this. Unfortunately I can't read the patch itself as
> I am also trying to improve JGit's blame code for $DAY_JOB, and JGit
> is BSD licensed.

Actually, I'd have suggested asking $EMPLOYER to buy the rights for looking at the code, but as I wrote previously, I'd seriously doubt that he'd get his money's worth for use in a _Java_ implementation.

The C code I proposed is good for files with many small changes: I'd suggest benchmarking your JGit code with some of them. If the JGit is still dominated by unpacking, your implementation should be fine. The current C version instead thrashes around digging through its own all-purpose single linear list.

Here are two real-world test cases:

git://git.savannah.gnu.org/emacs.git git blame [-M / -C] src/xdisp.c

http://repo.or.cz/r/wortliste.git git blame [-M / -C] wortliste

The latter one is _really_ taking a severe hit from the O(n^2) algorithms. If your benchmarks for that one still point mostly to the unpacking, your jgit blame should be fine regarding the stuff I reimplemented.

-- 
David Kastrup
Previous: David KastrupNext: David Kastrup
Message 11 of 20 in “blame: large-scale performance rewrite”
  1. 1/2 blame: large-scale performance rewriteDavid Kastrup, Apr 25, 2014
  2. 2/2 Mention "git blame" improvements in release notesDavid Kastrup, Apr 25, 2014
  3. Junio C HamanoApr 26, 2014
  4. David KastrupApr 26, 2014
  5. Shawn PearceApr 26, 2014
  6. David KastrupApr 26, 2014
  7. Shawn PearceApr 26, 2014
  8. David KastrupApr 26, 2014
  9. Shawn PearceApr 26, 2014
  10. David KastrupApr 26, 2014
  11. David KastrupApr 26, 2014
  12. David KastrupApr 26, 2014
  13. Shawn PearceApr 26, 2014
  14. David KastrupApr 26, 2014
  15. Shawn PearceApr 27, 2014
  16. David KastrupApr 28, 2014
  17. Junio C HamanoApr 28, 2014
  18. David KastrupApr 28, 2014
  19. Ronnie SahlbergApr 28, 2014
  20. David KastrupApr 28, 2014

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.