You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2016/06/27 19:05:54 UTC

Re: svn commit: r1750392 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_fcgi.c modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c

> On Jun 27, 2016, at 1:26 PM, ylavic@apache.org wrote:
> 
> +    apr_bucket_brigade *tmp_bb;
> } proxy_conn_rec;
> 

I am missing the reason why this brigade needs to be
a field in this struct. Is it simply to prevent us having
to create it during each call of ap_proxy_check_backend()?




Re: svn commit: r1750392 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_fcgi.c modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c

Posted by Yann Ylavic <yl...@gmail.com>.
On Tue, Jun 28, 2016 at 1:52 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>
>> On Jun 27, 2016, at 4:25 PM, Yann Ylavic <yl...@gmail.com> wrote:
>>
>> On Mon, Jun 27, 2016 at 9:05 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>>>
>>>> On Jun 27, 2016, at 1:26 PM, ylavic@apache.org wrote:
>>>>
>>>> +    apr_bucket_brigade *tmp_bb;
>>>> } proxy_conn_rec;
>>>>
>>>
>>> I am missing the reason why this brigade needs to be
>>> a field in this struct. Is it simply to prevent us having
>>> to create it during each call of ap_proxy_check_backend()?
>>
>> Yes, mainly, we could create/destroy (yet another) temporary brigade
>> in ap_proxy_check_backend(), but there are several places already
>> where we do that (and where the proxy_conn_rec is available).
>> I thought we could later follow up on this change and optimize these
>> by using the new tmp_bb field (cleanup is faster than
>> create/destroy)...
>
> Oh. Gotcha. +1. We should make sure to document it as such.
> If there is data in the brigade between function calls, we
> will get some weird behavior :)

Good point, will do.

Re: svn commit: r1750392 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_fcgi.c modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c

Posted by Jim Jagielski <ji...@jaguNET.com>.
> On Jun 27, 2016, at 4:25 PM, Yann Ylavic <yl...@gmail.com> wrote:
> 
> On Mon, Jun 27, 2016 at 9:05 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>> 
>>> On Jun 27, 2016, at 1:26 PM, ylavic@apache.org wrote:
>>> 
>>> +    apr_bucket_brigade *tmp_bb;
>>> } proxy_conn_rec;
>>> 
>> 
>> I am missing the reason why this brigade needs to be
>> a field in this struct. Is it simply to prevent us having
>> to create it during each call of ap_proxy_check_backend()?
> 
> Yes, mainly, we could create/destroy (yet another) temporary brigade
> in ap_proxy_check_backend(), but there are several places already
> where we do that (and where the proxy_conn_rec is available).
> I thought we could later follow up on this change and optimize these
> by using the new tmp_bb field (cleanup is faster than
> create/destroy)...

Oh. Gotcha. +1. We should make sure to document it as such.
If there is data in the brigade between function calls, we
will get some weird behavior :)

Re: svn commit: r1750392 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_fcgi.c modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Jun 27, 2016 at 10:25 PM, Yann Ylavic <yl...@gmail.com> wrote:
> I thought we could later follow up on this change and optimize these
> by using the new tmp_bb field (cleanup is faster than
> create/destroy)...

Something like the attached patch.

Re: svn commit: r1750392 - in /httpd/httpd/trunk: CHANGES docs/log-message-tags/next-number include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_fcgi.c modules/proxy/mod_proxy_http.c modules/proxy/proxy_util.c

Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Jun 27, 2016 at 9:05 PM, Jim Jagielski <ji...@jagunet.com> wrote:
>
>> On Jun 27, 2016, at 1:26 PM, ylavic@apache.org wrote:
>>
>> +    apr_bucket_brigade *tmp_bb;
>> } proxy_conn_rec;
>>
>
> I am missing the reason why this brigade needs to be
> a field in this struct. Is it simply to prevent us having
> to create it during each call of ap_proxy_check_backend()?

Yes, mainly, we could create/destroy (yet another) temporary brigade
in ap_proxy_check_backend(), but there are several places already
where we do that (and where the proxy_conn_rec is available).
I thought we could later follow up on this change and optimize these
by using the new tmp_bb field (cleanup is faster than
create/destroy)...