Summary:ASTERISK-05301: [patch] small performance tweak in ast_variable_retrieve
Reporter:Jason Parker (jparker)Labels:
Date Opened:2005-10-16 14:17:51Date Closed:2008-01-15 15:51:25.000-0600
Versions:Frequency of
Environment:Attachments:( 0) config.patch
Description:In ast_variable_retrieve, there is a for loop that is run twice.  It is the exact same loop both times...this is kinda pointless I think.

Basically what I've done is remove the second for loop, put the code from that loop (modified) into the first loop, and only return the value it finds IF what was in the first for loop doesn't return.

I could have just dropped them both as is into one for loop, but I figured that it was done that way so it can be checked with case sensitivity first, then again without.  My patch uses that same case functionality, in only one loop.


Go easy on me...
Comments:By: Jason Parker (jparker) 2005-10-16 14:20:58

Kevin: this is what I was talking about the other day.

By: Mark Spencer (markster) 2005-10-16 23:59:34

Fixed in CVS head, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:51:24.000-0600

Repository: asterisk
Revision: 6804

U   trunk/config.c

r6804 | markster | 2008-01-15 15:51:24 -0600 (Tue, 15 Jan 2008) | 2 lines

Improve config parsing performance (bug ASTERISK-5301)



By: Digium Subversion (svnbot) 2008-01-15 15:51:25.000-0600

Repository: asterisk
Revision: 6805

U   trunk/config.c

r6805 | kpfleming | 2008-01-15 15:51:25 -0600 (Tue, 15 Jan 2008) | 2 lines

correct behavior change introduced by issue ASTERISK-5301 patch