Re: [PATCH] Add a new lstat implementation based on Win32 API, and make stat use that implementation too.
- From
Marius Storm-Olsen <marius@trolltech.com>
- Date
- Sep 2, 2007, 18:18 UTC
- Message-ID
- <46DAFE80.4040707@trolltech.com>
- In-Reply-To
- <Pine.LNX.4.64.0709021843270.28586@racer.site>
Johannes Schindelin wrote:
Show 8 quoted lines
> On Sun, 2 Sep 2007, Marius Storm-Olsen wrote: >> The conversion of the FileTime to unix time_t is far more heavy. > > Really? If so, we might consider storing FILETIME->dwHightDateTime > and ->dwLowDateTime in the index. > > But I doubt it. AFAICT _getting_ at the stat data is the expensive > thing in Windows, not a 64-bit addition, subtraction and division.
Haha, sure sure, _getting_ that stat data in the first place is the expensive part on Windows. However, that's something you _have_ to do no matter what, so there's no way around that.
Turns out that it wasn't as bad as i thought. If you have
filetime_to_time_t() just return, say 116444736, I see
git add . improve with ~0.5 sec for 100K files
and git status improve with 0.05 secSurely, avoiding the tripple stat'ing in 'git status' would help a lot more ;-) So, I guess we'll just leave the timestamp conversion as is, and avoid complicating the index.
-- .marius