[EMAIL PROTECTED] wrote:
Author: jm
Date: Thu Dec  7 12:37:31 2006
New Revision: 483650

URL: http://svn.apache.org/viewvc?view=rev&rev=483650
Log:
bug 5206: detect duplicate rules, and silently merge them internally for 
greater efficiency.  This results in about 100-120KB RAM usage saving in 
current svn trunk's ruleset, detecting lots of duplicate rules -- so is well 
worth doing.  also, change t/priorities.t so it doesn't accidentally confuse 
itself with duplicate rules

+sub find_dup_rules {

+    if (defined $names_for_text{$text}) {
+      $names_for_text{$text} .= " ".$name;
+      $dups{$text} = 1;     # found (at least) one
+    } else {
+      $names_for_text{$text} = $name;
+    }
+  }

undef rather than 1 could have saved you another 8 bytes (total) or so in addition to the 100KB you already saved. :)

In any case, good enhancement... I'm sure there are a LOT of rules that overlap with third party rules.


Daryl

Reply via email to