[lug] Polling a file under linux

rm at fabula.de rm at fabula.de
Tue Apr 22 06:37:26 MDT 2003

On Mon, Apr 21, 2003 at 04:04:50PM -0600, Ed Hill wrote:
> On Mon, 2003-04-21 at 14:04, Sean Reifschneider wrote:
> > ...
> > 
> > Remember, premature optimization is the root of all evil.  The first
> > rule of optimization is: Don't do it...
> You give it way too much credit.  Its more like "a root of some evil". 
> There are *myriad* ways to botch things and premature optimization is
> only one of them.

Yes, but premature optimization seems to be a very commond desease ;-)
Ome can find it over and over again in newsgroups and mailing lists.
And, since optimization often bloats and obfuscatews the code, it might
well be the cause of those myriad other faults ...

For the case mentioned: i'd say that a call to stat a file that often
will result in a permanent residence of the inode struct in the cache 
and cost will be minimal (as Sean's analysis seems to indicate).

Just my 0.2 cent 

  Ralf Mattes

> ;-)
> Ed
> -- 
> Edward H. Hill III, PhD 
> Post-Doctoral Researcher
> Division of ESE, Colorado School of Mines, Golden, CO 80401
> Email: ed at eh3.com  ehill at mines.edu
> Phone: 303-273-3483
> URLs:  http://cesep.mines.edu/people/hill.htm  http://eh3.com

More information about the LUG mailing list