On Mon, 2002-09-23 at 03:30, Greg Stein wrote: > On Sun, Sep 22, 2002 at 07:00:42PM -0700, Brian Pane wrote: > > On Sun, 2002-09-22 at 16:34, Greg Stein wrote: > >... > > All the copying doesn't bother me as much, because it's the same > > thing that would happen if you did a dozen calls to apr_brigade_write() > > for slightly less than APR_BUCKET_BUFF_SIZE bytes each. So the copying > > overhead in this case would be no worse than apr_brigade_write(). > > That's not an argument :-) You're only comparing brigade_writev() against > *prior* usage which did a bunch of _write() calls. So what?
So there's no performance penalty for using the current implementation on large buffers, compared to the alternate way of writing large buffers. That's important because, if we were to change it to precompute the total length, there likely *would* be a performance penalty for small buffers (an extra O(n) loop through the iovec). And small buffers are the common use case right now. Brian
