httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: [PATCH] allocate properly-sized buffer for header
Date Thu, 25 Jan 2001 18:59:03 GMT

> > > *I'm extremely uncomfortable with the idea that a buffered API has no
> > > way to get rid of the data -- e.g., ap_pass_brigade() -- before
> > > returning to the caller.
> > 
> > It would be possible to create ap_f* functions with the apr_brigade_*
> > functions, which would buffer and still provide the ap_pass_brigade call
> > before returning to the caller.  This would also allow filter writers to
> > avoid dealing with brigades directly.  I'll work up a REALLY quick patch
> > that shows the ideas without being perfectly correct.
> 
> But apr_brigade_*() will still use an unbounded amount of storage in
> handling a particular operation, unless the wrapper function has to
> split up the operation into chunks, with ap_pass_brigade() between
> chunks (to avoid building up huge brigade and thus use an unfair
> amount of the system's virtual memory for this one request).
> 
> When the wrapper function has such a useful property, who is going to
> use the underlying routine?

The chances are that the ap_r* functions will do the splitting.  As far as
who would use the underlying functions if the wrapper works so well, is
that the underlying stuff is useful for all programs, the wrapper is
useful for Apache.  Those are two very different uses.  I believe most
programs will need some kind of wrapper around the underlying
functions.  This is the same way the BUFF calls used to work, and IMHO it
is a good mode to continue.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message