You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by he...@apache.org on 2021/05/09 13:47:33 UTC

svn commit: r1889704 - /spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm

Author: hege
Date: Sun May  9 13:47:33 2021
New Revision: 1889704

URL: http://svn.apache.org/viewvc?rev=1889704&view=rev
Log:
Shave off 50ms parsing time

Modified:
    spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm

Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm
URL: http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?rev=1889704&r1=1889703&r2=1889704&view=diff
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm (original)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm Sun May  9 13:47:33 2021
@@ -251,7 +251,7 @@ sub parse {
     my $parse_error;    # undef by default, may be overridden
 
     # don't count internal file start/end lines
-    $self->{linenum}{$self->{currentfile}}++ unless $line =~ /^file\s/;
+    $self->{linenum}{$self->{currentfile}}++ if index($line, 'file ') != 0;
 
     if (index($line,'#') > -1) {
       # bug 5545: used to support testing rules in the ruleqa system