apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: stupid bucket tricks
Date Thu, 27 Sep 2001 13:58:58 GMT
> 
> Does anyone have a sense of how long a string would have to be before
> this:
> 
>     str = apr_psprintf(p, "</PRE>\n\n<HR></HR>\n\n%s\n\n</BODY>\n</HTML>\n",
>                        ap_psignature("", r));
>     e = apr_bucket_pool_create(str, strlen(str), p);
>     APR_BRIGADE_INSERT_TAIL(out, e);
> 
> got to be significantly more expensive than this?
> 
>     e = apr_bucket_immortal_create("</PRE>\n\n<HR></HR>\n\n", len1);
>     APR_BRIGADE_INSERT_TAIL(out, e);
>     str = ap_psignature("", r);
>     e = apr_bucket_pool_create(str, strlen(str), r->pool);
>     APR_BRIGADE_INSERT_TAIL(out, e);
>     e = apr_bucket_immortal_create("\n\n</BODY>\n</HTML>\n", len2);
>     APR_BRIGADE_INSERT_TAIL(out, e);
> 
> I guess a big part of that question is "how expensive is apr_psprintf?"

sprintf() (the CRT version) is wicked expensive

Bill


Mime
View raw message