git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: bdowning@lavos.net (Brian Downing)
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Steffen Prohaska <prohaska@zib.de>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	msysgit@googlegroups.com
Subject: Re: [PATCH] Avoid running lstat(2) on the same cache entry.
Date: Sun, 20 Jan 2008 14:03:10 -0600	[thread overview]
Message-ID: <20080120200310.GK22503@lavos.net> (raw)
In-Reply-To: <alpine.LFD.1.00.0801200942191.2957@woody.linux-foundation.org>

On Sun, Jan 20, 2008 at 10:20:46AM -0800, Linus Torvalds wrote:
> But I guess that was a bit optimistic. On Linux, we still had about 50% 
> user time, and I guess the same is _largely_ true on Windows. Cutting the 
> system time in half only gives you about a quarter performance 
> improvement, and I was just incorrect in expecting system calls to be the 
> limiting factor.
> 
> [...]
> 
> fnmatch? It's certainly visible on Linux, I wonder if the Windows/OSX 
> version is more expensive due to trying to be case-insensitive or 
> something?

Windows (msys) Git, with the lstat patch and on my 15433-file test case,
is at least 90-95% system time.  I don't have any good tools for
measuring this, but just using the silly performance monitor you get
with ctrl-alt-del and enabling the "View -> Show Kernel Times" curve on
the graph shows this fact pretty clearly.

I think this shows that:

1. There's not much overhead in msysGit's stat wrapper at all.  It gets
   converted quite efficiently to native Windows calls.

2. Windows really sucks at filesystem ops.  Film at 11.

One thing I dimly recall is that the nightmare interface of
FindFirstFile/FindNextFile (which I assume is what is actually getting
called for opendir/readdir) actually returns some stat information with
each file.  Would it be possible to use that directly in some cases
rather than taking an extra stat call to get it?

-bcd

  reply	other threads:[~2008-01-20 20:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-19  3:25 Updated in-memory index cleanup Linus Torvalds
2008-01-19  7:42 ` [PATCH] index: be careful when handling long names Junio C Hamano
2008-01-19  7:45 ` [PATCH] Avoid running lstat(2) on the same cache entry Junio C Hamano
2008-01-19 19:47   ` Linus Torvalds
2008-01-19 19:58     ` Linus Torvalds
2008-01-20  1:22     ` Linus Torvalds
2008-01-20  1:34       ` Linus Torvalds
2008-01-20  1:48       ` Johannes Schindelin
2008-01-20  2:02         ` Linus Torvalds
2008-01-20 10:33         ` Steffen Prohaska
2008-01-20 14:15           ` Johannes Schindelin
2008-01-21  0:18           ` Junio C Hamano
2008-01-20 15:10         ` Steffen Prohaska
2008-01-20 15:18           ` Johannes Schindelin
2008-01-20 15:19             ` [PATCH] Also use unpack_trees() in do_diff_cache() Johannes Schindelin
2008-01-20 20:32               ` Linus Torvalds
2008-01-20 21:53                 ` Linus Torvalds
2008-01-20 23:34                   ` Johannes Schindelin
2008-01-20 23:58                     ` Linus Torvalds
2008-01-21  0:19                       ` Johannes Schindelin
2008-01-20 15:21             ` [PATCH] Try to resurrect the handling for 'diff-index -m' Johannes Schindelin
2008-01-20 18:20           ` [PATCH] Avoid running lstat(2) on the same cache entry Linus Torvalds
2008-01-20 20:03             ` Brian Downing [this message]
2008-01-20 21:40             ` Steffen Prohaska
2008-01-20 22:09               ` Linus Torvalds
2008-01-20  2:42       ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080120200310.GK22503@lavos.net \
    --to=bdowning@lavos.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.com \
    --cc=prohaska@zib.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).