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

Re: Performance issue of 'git branch'

From
CMCarlos R. Mafra <crmafra2@gmail.com>
Date
Jul 24, 2009, 23:46 UTC
Message-ID
<20090724234648.GA4616@Pilar.aei.mpg.de>
In-Reply-To
<alpine.LFD.2.01.0907241349390.3960@localhost.localdomain>

Sorry for the delay and missing the "strace -ttT" request, but today was a "Physics" day and took me longer to notice your email.

On Fri 24.Jul'09 at 14:21:20 -0700, Linus Torvalds wrote:
Show 5 quoted lines
> 
> What a huge difference!
> 
> And the NO_CURL version really does load a lot faster in cold-cache. We're 
> not talking small differences:

With NO_CURL=1 the strace log contained 242 lines (vs 404), but the time difference was not as great as you got. But it was better:

0.55 +- 0.06 (for 8 runs)

So I repeated the tests with curl enabled and this time I got:

0.77 +- 0.03 (for 6 runs)
(yesterday I got 0.61 +- 0.08, so there is lot of noise)

So it is better, but not by the same factor as you saw. But I may have an explanation for this.

After I clear the cache I wait a few seconds to stabilize, and I do the 'time git branch' test when I see that there is no activity in the disk by looking at the 'btrace' output in another xterm.

I noticed that after dropping the cache and before I do the test there is lot of activity of something called 'preload', with lines which look like these:

8,0 0 42881 495.067655112 17777 Q R 51244367 + 552 [preload] 8,0 0 42882 495.067659931 17777 G R 51244367 + 552 [preload] 8,0 0 42883 495.067664401 17777 I R 51244367 + 552 [preload]

I hadn't noticed this before and now I checked that,

"preload is an adaptive readahead daemon that prefetches files mapped by applications from the disk to reduce application startup time."

So I guess that my tests here for your NO_CURL=1 idea is inconclusive, as I am not sure what preload is prefetching.

Previous: Johannes SchindelinNext: Carlos R. Mafra
Message 54 of 73 in “Performance issue of 'git branch'”
  1. Carlos R. MafraJul 22, 2009
  2. Linus TorvaldsJul 23, 2009
  3. Linus TorvaldsJul 23, 2009
  4. Linus TorvaldsJul 23, 2009
  5. Carlos R. MafraJul 23, 2009
  6. Linus TorvaldsJul 23, 2009
  7. Jakub NarebskiJul 23, 2009
  8. Carlos R. MafraJul 23, 2009
  9. Linus TorvaldsJul 23, 2009
  10. Carlos R. MafraJul 23, 2009
  11. Linus TorvaldsJul 23, 2009
  12. Linus TorvaldsJul 23, 2009
  13. Linus TorvaldsJul 23, 2009
  14. Linus TorvaldsJul 23, 2009
  15. Tony FinchJul 23, 2009
  16. Linus TorvaldsJul 23, 2009
  17. Newton-Raphson, was Re: Performance issue of 'git branch'Tony Finch, Jul 23, 2009
  18. Johannes SchindelinJul 23, 2009
  19. Tony FinchJul 23, 2009
  20. Johannes SchindelinJul 24, 2009
  21. Carlos R. MafraJul 23, 2009
  22. Carlos R. MafraJul 23, 2009
  23. Carlos R. MafraJul 23, 2009
  24. Linus TorvaldsJul 23, 2009
  25. Linus TorvaldsJul 23, 2009
  26. Junio C HamanoJul 23, 2009
  27. Carlos R. MafraJul 23, 2009
  28. Junio C HamanoJul 23, 2009
  29. Linus TorvaldsJul 23, 2009
  30. Junio C HamanoJul 23, 2009
  31. Junio C HamanoJul 23, 2009
  32. Linus TorvaldsJul 23, 2009
  33. Carlos R. MafraJul 23, 2009
  34. Linus TorvaldsJul 23, 2009
  35. Carlos R. MafraJul 23, 2009
  36. Linus TorvaldsJul 23, 2009
  37. Linus TorvaldsJul 23, 2009
  38. Carlos R. MafraJul 23, 2009
  39. Linus TorvaldsJul 24, 2009
  40. Linus TorvaldsJul 24, 2009
  41. Linus TorvaldsJul 24, 2009
  42. Linus TorvaldsJul 24, 2009
  43. david@lang.hmJul 24, 2009
  44. Linus TorvaldsJul 24, 2009
  45. david@lang.hmJul 24, 2009
  46. Linus TorvaldsJul 25, 2009
  47. Daniel BarkalowJul 25, 2009
  48. Jeff KingAug 7, 2009
  49. Theodore TsoJul 24, 2009
  50. Shawn O. PearceJul 24, 2009
  51. Junio C HamanoJul 24, 2009
  52. Avi KivityJul 26, 2009
  53. Johannes SchindelinJul 26, 2009
  54. Carlos R. MafraJul 24, 2009
  55. Carlos R. MafraJul 25, 2009
  56. Linus TorvaldsJul 25, 2009
  57. Timo HirvonenJul 25, 2009
  58. Reece DunnJul 25, 2009
  59. Mike HommeyJul 25, 2009
  60. Linus TorvaldsJul 25, 2009
  61. Linus TorvaldsJul 25, 2009
  62. Johannes SchindelinJul 25, 2009
  63. Linus TorvaldsJul 26, 2009
  64. Theodore TsoJul 26, 2009
  65. Mike HommeyJul 26, 2009
  66. Johannes SchindelinJul 26, 2009
  67. demerphqJul 26, 2009
  68. demerphqJul 26, 2009
  69. Carlos R. MafraJul 25, 2009
  70. Anders KaseorgJul 23, 2009
  71. Carlos R. MafraJul 23, 2009
  72. SZEDER GáborJul 23, 2009
  73. Carlos R. MafraJul 23, 2009

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.