[asterisk-commits] murf: trunk r89583 - in /trunk: ./ configs/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 26 10:24:27 CST 2007


Author: murf
Date: Mon Nov 26 10:24:27 2007
New Revision: 89583

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89583
Log:
Thanks to pnlarsson for noting the spelling error in the cli commands. Also, added some verbage about the new algorithm to CHANGES.

Modified:
    trunk/CHANGES
    trunk/configs/extensions.conf.sample
    trunk/main/pbx.c

Modified: trunk/CHANGES
URL: http://svn.digium.com/view/asterisk/trunk/CHANGES?view=diff&rev=89583&r1=89582&r2=89583
==============================================================================
--- trunk/CHANGES (original)
+++ trunk/CHANGES Mon Nov 26 10:24:27 2007
@@ -55,6 +55,7 @@
   * Ability to set process limits ("ulimit") without restarting Asterisk
   * Enhanced "agi debug" to print the channel name as a prefix to the debug
      output to make debugging on busy systems much easier.
+  * New CLI commands "dialplan set extenpatternmatching true/false"
 
 SIP changes
 -----------
@@ -345,3 +346,12 @@
   * Added a new channel driver, chan_unistim.  See doc/unistim.txt and
      configs/unistim.conf.sample for details.  This new channel driver allows
      you to use Nortel i2002, i2004, and i2050 phones with Asterisk.
+  * A new extension pattern matching algorithm, based on a trie, is introduced
+    here, that could noticeably speed up mid-sized to large dialplans.
+    It is NOT used by default, as duplicating the behaviour of the old pattern
+    matcher is still under development. A config file option, in extensions.conf,
+    in the [general] section, called "extenpatternmatchingnew", is by default
+    set to false; setting that to true will force the use of the new algorithm.
+    Also, the cli commands "dialplan set extenpatternmatchingnew true/false" can
+    be used to switch the algorithms at run time.
+

Modified: trunk/configs/extensions.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/extensions.conf.sample?view=diff&rev=89583&r1=89582&r2=89583
==============================================================================
--- trunk/configs/extensions.conf.sample (original)
+++ trunk/configs/extensions.conf.sample Mon Nov 26 10:24:27 2007
@@ -36,20 +36,33 @@
 ;
 ;autofallthrough=no
 ;
-; By default, the old pattern matcher is used. 
-
+;
+;
 ; If extenpatternmatchnew is set (true, yes, etc), then a new algorithm that uses
 ; a Trie to find the best matching pattern is used. In dialplans
 ; with more than about 20-40 extensions in a single context, this
 ; new algorithm can provide a noticeable speedup. 
+; With 50 extensions, the speedup is 1.32x
+; with 88 extensions, the speedup is 2.23x
+; with 138 extensions, the speedup is 3.44x
+; with 238 extensions, the speedup is 5.8x
+; with 438 extensions, the speedup is 10.4x
 ; With 1000 extensions, the speedup is ~25x
 ; with 10,000 extensions, the speedup is 374x
-; Basically, the new algorithm provides a fairly flat response 
+; Basically, the new algorithm provides a flat response 
 ; time, no matter the number of extensions.
 ;
+; By default, the old pattern matcher is used. 
+;
+; ****This is a new feature! *********************
 ; The new pattern matcher is for the brave, the bold, and 
-; the desperate. If you have large dialplans, and/or high 
-; call volume, you might consider setting this value to "yes" !!
+; the desperate. If you have large dialplans (more than about 50 extensions
+; in a context), and/or high call volume, you might consider setting 
+; this value to "yes" !!
+; Please, if you try this out, and are forced to return to the
+; old pattern matcher, please report your reasons in a bug report
+; on bugs.digium.com. We have made good progress in providing something
+; compatible with the old matcher; help us finish the job!
 ;
 ; This value can be switched at runtime using the cli command "dialplan set extenpatternmatchnew true"
 ; or "dialplan set extenpatternmatchnew false", so you can experiment to your hearts content.

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=89583&r1=89582&r2=89583
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Mon Nov 26 10:24:27 2007
@@ -4850,7 +4850,7 @@
 	
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "dialplan set extenpaternmatchnew true";
+		e->command = "dialplan set extenpatternmatchnew true";
 		e->usage = 
 			"Usage: dialplan set extenpatternmatchnew true|false\n"
 			"       Use the NEW extension pattern matching algorithm, true or false.\n";
@@ -4878,7 +4878,7 @@
 	
 	switch (cmd) {
 	case CLI_INIT:
-		e->command = "dialplan set extenpaternmatchnew false";
+		e->command = "dialplan set extenpatternmatchnew false";
 		e->usage = 
 			"Usage: dialplan set extenpatternmatchnew true|false\n"
 			"       Use the NEW extension pattern matching algorithm, true or false.\n";




More information about the asterisk-commits mailing list