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

Re: [RFC \ WISH] Add -o option to git-rev-list

From
Linus Torvalds <torvalds@osdl.org>
Date
Dec 11, 2006, 19:25 UTC
Message-ID
<Pine.LNX.4.64.0612111120190.12500@woody.osdl.org>
In-Reply-To
<e5bfff550612111059g35f1aa2dmdead17a60f5dfca8@mail.gmail.com>
On Mon, 11 Dec 2006, Marco Costalba wrote:
> 
> $ time sh -c "git rev-list --header --boundary --parents --topo-order HEAD | cat > /dev/null"
> $ time sh -c "git rev-list --header --boundary --parents --topo-order HEAD > /tmp/tmp.txt; cat /tmp/tmp.txt > /dev/null"

Btw, for me the numbers aren't stable enough to be al lthat final, but doing it multiple times on the kernel archive I get:

	real    0m0.947s
	real    0m1.046s
	real    0m0.943s
	real    0m0.868s
for the pipe case, and
	real    0m0.953s
	real    0m1.056s
	real    0m1.060s
	real    0m0.968s

for the temp-file. IOW, no real difference. Just doing the "> /dev/null" directly is more consistent (no task-switching, SMP effects, or cache conflicts) at

	real    0m0.806s
	real    0m0.806s
	real    0m0.805s
	real    0m0.808s

but one recurrent theme is definitely true: the "cat" part is a noticeable overhead. But that in itself means that git-rev-list is just so efficient that even just basically copying its output is going to be measurable.

Which is obviously a good thing, but it means that it's not very interesting in the big picture (ie I bet the real overheads are going to be elsewhere if you actually expect to draw anything on the screen).

Previous: Marco CostalbaNext: Josef Weidendorfer
Message 21 of 36 in “[RFC \ WISH] Add -o option to git-rev-list”
  1. Marco CostalbaDec 10, 2006
  2. Alex RiesenDec 10, 2006
  3. Linus TorvaldsDec 10, 2006
  4. Marco CostalbaDec 10, 2006
  5. Linus TorvaldsDec 10, 2006
  6. Linus TorvaldsDec 10, 2006
  7. Marco CostalbaDec 10, 2006
  8. Marco CostalbaDec 10, 2006
  9. Linus TorvaldsDec 10, 2006
  10. Marco CostalbaDec 10, 2006
  11. Linus TorvaldsDec 10, 2006
  12. Marco CostalbaDec 11, 2006
  13. Linus TorvaldsDec 11, 2006
  14. Marco CostalbaDec 11, 2006
  15. Alex RiesenDec 11, 2006
  16. Linus TorvaldsDec 11, 2006
  17. Linus TorvaldsDec 11, 2006
  18. Marco CostalbaDec 11, 2006
  19. Linus TorvaldsDec 11, 2006
  20. Marco CostalbaDec 11, 2006
  21. Linus TorvaldsDec 11, 2006
  22. Josef WeidendorferDec 11, 2006
  23. Linus TorvaldsDec 11, 2006
  24. Josef WeidendorferDec 11, 2006
  25. Linus TorvaldsDec 11, 2006
  26. Marco CostalbaDec 15, 2006
  27. Linus TorvaldsDec 15, 2006
  28. Marco CostalbaDec 15, 2006
  29. Marco CostalbaDec 15, 2006
  30. Josef WeidendorferDec 11, 2006
  31. Marco CostalbaDec 11, 2006
  32. Josef WeidendorferDec 11, 2006
  33. Marco CostalbaDec 11, 2006
  34. Andreas EricssonDec 11, 2006
  35. Marco CostalbaDec 11, 2006
  36. Andreas EricssonDec 11, 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.