[cfe-commits] r120066 - in /cfe/trunk: include/clang/Basic/FileManager.h lib/Basic/FileManager.cpp lib/Basic/FileSystemStatCache.cpp

Francois Pichet pichet2000 at gmail.com
Tue Nov 23 19:12:03 PST 2010


On Tue, Nov 23, 2010 at 5:32 PM, Chris Lattner <sabre at nondot.org> wrote:
> Author: lattner
> Date: Tue Nov 23 16:32:37 2010
> New Revision: 120066
>
> URL: http://llvm.org/viewvc/llvm-project?rev=120066&view=rev
> Log:
> The final result of all this refactoring: instead of doing stat immediately
> followed by an open for every source file we open, probe the file system with
> 'open' and then do an fstat when it succeeds.  open+fstat is faster than
> stat+open because the kernel only has to perform the string->inode mapping
> once.  Presumably it gets faster the deeper in your filesystem a lookup
> happens.
>
> For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on
> my machine, a 7.7% speedup.
>
>
> Modified:
>    cfe/trunk/include/clang/Basic/FileManager.h
>    cfe/trunk/lib/Basic/FileManager.cpp
>    cfe/trunk/lib/Basic/FileSystemStatCache.cpp
>

This caused some problems on Windows. see r120079.




More information about the cfe-commits mailing list