This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (seeks while reading) Re: Performance, argh


Maciej Stachowiak <mstachow@alum.mit.edu> writes:

> * Many files are access'd and then stat'd, or vice versa. The
>   duplication should be investigated and removed (if `load' is trying
>   to do an access() or a stat() before open()ing the file that is
>   bogus, it should just do the open and check for an error return).

If practical.  Be aware that there are some file systems that
implement access-control schemes where you can't predict your access
rights from the stat() data.  You might want to use stat() to check
that it's a file, and access() to find out if you can read it.  And on
some systems you can open() a directory.  (I don't know if that's
common any more; I think it used to be.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]