Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] Core: slight optimization in ngx_chain_update_chains()

Maxim Dounin
November 11, 2016 02:12PM
Hello!

On Fri, Nov 11, 2016 at 10:38:55AM +0800, 胡聪 (hucc) wrote:

> Hello!
>
>
> On Fri, Nov 11, 2016 at 0:55 AM, Maxim Dounin wrote:
>
> >Looking into this again I tend to think that better solution would
> >be to test *out in additional if around all operations with *out,
> >like this (diff -w for clarity):
> >
> >@@ -186,6 +186,7 @@ ngx_chain_update_chains(ngx_pool_t *p, n
> > {
> > ngx_chain_t *cl;
> >
> >+ if (*out) {
> > if (*busy == NULL) {
> > *busy = *out;
> >
> >@@ -196,6 +197,7 @@ ngx_chain_update_chains(ngx_pool_t *p, n
> > }
> >
> > *out = NULL;
> >+ }
> >
> > while (*busy) {
> > cl = *busy;
>
> Yes, it`s truly better!

Committed, thanks.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH] Core: slight optimization in ngx_chain_update_chains()

胡聪 (hucc) 422 November 09, 2016 09:32PM

Re: [PATCH] Core: slight optimization in ngx_chain_update_chains()

Maxim Dounin 192 November 10, 2016 11:56AM

Re: [PATCH] Core: slight optimization in ngx_chain_update_chains()

胡聪 (hucc) 179 November 10, 2016 09:40PM

Re: [PATCH] Core: slight optimization in ngx_chain_update_chains()

Maxim Dounin 181 November 11, 2016 02:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 203
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready