httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: [PATCH] resubmit new and improved ap_vrprintf fix to handle > 4K
Date Tue, 11 Sep 2001 06:24:02 GMT
On Mon, Sep 10, 2001 at 09:13:46PM -0700, dean gaudet wrote:
> buhhh?
> 
> you guys built a zero-copy infrastructure and you're putting in a one-copy
> sprintf?

sprintf varieties must be at least one-copy, based on our vformatter code
(which BUFF used, too). It seems you're implying sprintf should be zero-copy
also. ??

> i don't get it.  this new ap_rsprintf is less efficient than the
> ap_bsprintf in apache-1.3.

I don't doubt it. The primary intent for ap_r* was compatibility; the most
optimal mechanism for delivering content is through the new brigade
mechanisms (down thru the filter chain).

> also, wow, ap_rputc really sucks now.  that's a lot of code (in
> buffer_output) compared to:
> 
>     *buf++ = c;
> 
> guess all your abstraction has hidden the real buffer and you can't do any
> useful optimisations?

At this point, we are not trying to optimize "around" the filter chain.
Since we can't know what is next in the chain, buffer_output we must use
ap_fwrite() to buffer the data.

In the future? Yah. Maybe we'll be able to do more, but that won't happen
for a while.

>...
> oh ouch i gotta stop looking:
> 
>     /* this will typically exit on the first test */
>     for (f = r->output_filters; f != NULL; f = f->next)
>         if (strcasecmp("OLD_WRITE", f->frec->name) == 0)
>             break;
> 
> i'm puking.  strcasecmp???? strings??

Yah :-) It could be optimized by recording a flag in the request_rec,
stating that the filter was inserted (rather than looking for it). The
strcasecmp() shouldn't be necessary because we uppercase f->frec->name
nowadays.

Not that it will improve things overall, but there ya go. :-)

Cheers,
-g

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

Mime
View raw message