Thread (32 messages) flat view 32 messages, 8 authors, 2016-06-15
  • (unknown) · Bevan Watkiss <hidden> · 2016-06-15
  • Re: · Alex Riesen <hidden> · 2016-06-15
  • RE: · Bevan Watkiss <hidden> · 2016-06-15
  • Re: · Alex Riesen <hidden> · 2016-06-15
  • RE: · Bevan Watkiss <hidden> · 2016-06-15
  • Re: · Björn Steinbrink <hidden> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · Bevan Watkiss <hidden> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · <hidden> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · <hidden> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · <hidden> · 2016-06-15
  • RE: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • RE: · <hidden> · 2016-06-15
  • Re: · Johan Herland <hidden> · 2016-06-15
  • RE: · Bevan Watkiss <hidden> · 2016-06-15
  • Re: · Alex Riesen <hidden> · 2016-06-15
  • Re: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • Re: · Brandon Casey <hidden> · 2016-06-15
  • Re: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • Re: · Brandon Casey <hidden> · 2016-06-15
  • Re: · Brandon Casey <hidden> · 2016-06-15
  • Re: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • Re: · Brandon Casey <hidden> · 2016-06-15
  • Re: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • Re: · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15
  • 'git checkout' and unlink() calls (was: Re: ) · Kjetil Barvik <hidden> · 2016-06-15
  • Re: 'git checkout' and unlink() calls (was: Re: ) · Linus Torvalds <torvalds@linux-foundation.org> · 2016-06-15

Re:

From: Brandon Casey <hidden>
Date: 2016-06-15 22:46:44

Linus Torvalds wrote:
On Fri, 8 May 2009, Alex Riesen wrote:
quoted
I did (cygwin). My guess, the improvement is completely dwarfed by the
other overheads (like starting git and writing files).
Oh, I meant "git checkout" as in not even switching branches, or perhaps 
switching branches but just changing a single file (among thousands).

If you actually end up re-writing all files, then yes, it will obviously 
be totally dominated by other things.

For example, in the kernel, switching between two branches that only 
differ in one file (Makefile) went from 0.18 seconds down to 0.14 seconds 
for me just because of the fewer lstat() calls.

Noticeable? No. But it might be more noticeable on some other OS, or with 
some networked filesystem.
plain 'git checkout' on linux kernel over NFS.

Best time without patch: 1.20 seconds

  0.45user 0.71system 0:01.20elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k
  0inputs+0outputs (0major+15467minor)pagefaults 0swaps

Best time with patch (core.preloadindex = true): 1.10 seconds

  0.43user 4.00system 0:01.10elapsed 402%CPU (0avgtext+0avgdata 0maxresident)k
  0inputs+0outputs (0major+13999minor)pagefaults 0swaps

Best time with patch (core.preloadindex = false): 0.84 seconds

  0.42user 0.39system 0:00.84elapsed 96%CPU (0avgtext+0avgdata 0maxresident)k
  0inputs+0outputs (0major+13965minor)pagefaults 0swaps

Best time with read_cache_preload patch only: 1.38 seconds

  0.45user 4.42system 0:01.38elapsed 352%CPU (0avgtext+0avgdata 0maxresident)k
  0inputs+0outputs (0major+13990minor)pagefaults 0swaps

The read_cache_preload() changes actually slow things down for me for this
case.

Reduction in lstat's gives a nice 30% improvement.

-brandon
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help