[cfe-dev] FileManager re-factor
Daniel Dunbar
daniel at zuster.org
Tue Dec 23 15:08:49 PST 2008
Interesting stuff... how did we live without these tools? :)
On Tue, Dec 23, 2008 at 2:56 PM, Chris Lattner <clattner at apple.com> wrote:
> 2. We end up "checking" some directories many times. For example,
> Cocoa.h checks /Users/sabre/llvm/Debug/Headers/ 82 times for files in
> my example, and only succeeds 5 times. It would be better to have
> DirectoryEntry get the file/dir contents of the directory after some
> number of queries using 'getdirentries'. This would save the repeated
> negative hits to a directory.
I'm a little paranoid about this, as this tradeoff could have a very
bad worst case, and it makes performance less predictable across
machines. However, for directories we expect to "control", like our
own headers directory, it would make sense to just provide a mechanism
to load the entire directory. Then we could investigate extending this
assumptions to directories we expect to have a controlled structure
(like frameworks).
Dynamically making this choice seems like asking for a bugzilla when
someone decides to drop their 6 headers into a directory with 10k
files.
- Daniel
More information about the cfe-dev
mailing list