httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: cvs commit: apache-2.0/htdocs/manual/developer layeredio.html
Date Mon, 27 Mar 2000 22:36:26 GMT
On Mon, 27 Mar 2000, Life is hard, and then you die. wrote:
> One day, Ralf S. Engelschall wrote:
> > > I had a couple of ways of doing the I/O layers,
> > > but any method that hid the layers from the module writers required a
> > > buffer to write to and read from that killer performance and increased our
> > > memory size expoentially.
> > 
> > It is clear that you need an extra buffer if more than one handler want
> > to act on the data. That's not the point. The point is that the decision
> > whether this extra buffer is required should be a lazy decision (i.e. on
> > demand) and which is done by the buffer library and not the users (the
> > content handlers) of the buffer library.
> 
> Hmm, why do you need a buffer? Maybe I'm just being dense, but "all
> layering does" is add to the call chain, i.e. an ap_bwrite(fb, buf, ...)
> by the producer passes the buf to next guy in the chain, who can either
> do something with it or pass that buf directly on.

Agreed.

A buffer might be handy to group up small writes before calling the
content-processing callback. For example, assume a producer issues a whole
bunch of ap_rputc() calls. It would be nice to group those, then call the
callback with a 1k buffer to handle.

IIRC, the BUFF layer has optional buffering. If a processor is fine with
getting single-byte dribbles, then the buffering could be disabled.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/


Mime
View raw message