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 2018/10/07 07:43:12 UTC

svn commit: r1843047 - /spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm

Author: hege
Date: Sun Oct  7 07:43:12 2018
New Revision: 1843047

URL: http://svn.apache.org/viewvc?rev=1843047&view=rev
Log:
Deprecate ancient TieOneStringHash usage, it's an absolute performance pig

Modified:
    spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm

Modified: spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm
URL: http://svn.apache.org/viewvc/spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm?rev=1843047&r1=1843046&r2=1843047&view=diff
==============================================================================
--- spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm (original)
+++ spamassassin/branches/3.4/lib/Mail/SpamAssassin/Conf.pm Sun Oct  7 07:43:12 2018
@@ -87,7 +87,6 @@ use Mail::SpamAssassin::NetSet;
 use Mail::SpamAssassin::Constants qw(:sa :ip);
 use Mail::SpamAssassin::Conf::Parser;
 use Mail::SpamAssassin::Logger;
-use Mail::SpamAssassin::Util::TieOneStringHash;
 use Mail::SpamAssassin::Util qw(untaint_var);
 use File::Spec;
 
@@ -4598,8 +4597,12 @@ sub new {
 
   # keep descriptions in a slow but space-efficient single-string
   # data structure
-  tie %{$self->{descriptions}}, 'Mail::SpamAssassin::Util::TieOneStringHash'
-    or warn "tie failed";
+  # NOTE: Deprecated usage of TieOneStringHash as of 10/2018, it's an
+  # absolute pig, doubling config parse time, while benchmarks indicate
+  # no difference in resident memory size!
+  $self->{descriptions} = { };
+  #tie %{$self->{descriptions}}, 'Mail::SpamAssassin::Util::TieOneStringHash'
+  #  or warn "tie failed";
 
   # after parsing, tests are refiled into these hashes for each test type.
   # this allows e.g. a full-text test to be rewritten as a body test in