--On Friday, March 28, 2003 10:30 AM -0800 Rasmus Lerdorf <[EMAIL PROTECTED]> wrote:

In doing a bit of performance tweaking on 1.3, I noticed that
ap_send_header_field() does an ap_rvputs() with each little piece of a
header which results in separate ap_bwrite() calls for "Primitive", ":",
"Value", "crlf" for each header line sent.  Rather than having these 1 and
2 character ap_bwrite() calls wouldn't it make more sense to ap_pstrcat()
these little bits together and do a single ap_bputs()?

I don't think it will necessarily effect things because not every ap_bwrite call results in a network write. It should try to fill up the buffer, then write only when the buffer is filled or a flush is called.


So, I think the savings of not having these extra calls to ap_bwrite (which typically won't block) will be offset by the (very expensive) ap_pstrcat call. You'd now be doing two copies (one strcpy and a memcpy).

Not to mention that the lines get longer and harder to read. -- justin

Reply via email to