apr-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: apr-util/buckets apr_brigade.c
Date Mon, 30 Sep 2002 00:19:31 GMT
On Sun, Sep 29, 2002 at 01:05:38AM -0000, brianp@apache.org wrote:
> brianp      2002/09/28 18:05:38
>   Modified:    buckets  apr_brigade.c
>   Log:
>   Rewrite of apr_brigade_writev().  It's now more efficient for
>   both large and small inputs: zero-copy for data larger than 8KB,
>   fewer operations (and fewer branches) per for-loop iteration
>   for the <= 8KB case.


I presume you found the "count the length up front" to have no impact in the
short case? Thus, going ahead and doing the count and then the switch to
transient buckets?

One thing I just realized, though: if there is no flush function, then a
transient could be a problem. I just double-checked apr_brigade_write() and
it switches over to HEAP buckets for that case. Should _writev follow the
same pattern?

btw, good call on the flush in between the two HEAP buckets. I woulda missed
that, and it could be a Bad Thing [if a _writev added a little, added a
little, added a little... and now you've got a billion HEAP buckets].


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

View raw message