nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] reducing system calls for file io


From: Adam Rogoyski
Subject: Re: [Nano-devel] reducing system calls for file io
Date: Sun, 21 Apr 2002 11:10:10 -0500 (CDT)

On Sat, 20 Apr 2002, Jay Carlson wrote:

> Because these kinds of problems affect many applications, there are
> libraries that can reduce this overhead.  One of them is called libc,
> and the subsystem implementing this is available through #include

   The correct thing would be to buffer the writes the same way it buffers
the reads, which your patch removes.  If you are really interested in
reducing the number of system calls, you want to use a larger buffer that
what libc does.  I think when I last looked at this libc tended to use
only half of BUFSIZ.
   Since reading files is done much more that writing files, and writing
to devices it typically much slower than reading, no one probably noticed
it being slow and no one bothered to change it.  Only when reading a file
are you actively waiting to do something.  When writing a file, typically
your task is done and an extra second doesn't usually bother people.

   Adam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]