Bug 71561 - speed boost by getting rid of $& and $'
speed boost by getting rid of $& and $'
Status: CLOSED CURRENTRELEASE
Product: Red Hat Raw Hide
Classification: Retired
Component: spamassassin (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Chip Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-08-15 03:17 EDT by Radu Greab
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-02-21 09:56:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Radu Greab 2002-08-15 03:17:17 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513

Description of problem:
Due to the use of $& and $' variables, a 1.5 MB test mail message was processed
in about 4000 seconds. After I've got rid of those variables, the mail the
processing time dropped to about 220 seconds.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Get a large text mail message pass it through /usr/bin/spamassassin and
measure the time.
2.Patch spamassassin and repeat the test.

	

Additional info:

The spamassassin version and release is 2.31-15.
Comment 1 Radu Greab 2002-08-15 03:19:02 EDT
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm.diff?r1=1.126&r2=1.127

===================================================================
RCS file: /cvsroot/spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm	2002/06/28 16:27:58	1.126
+++ spamassassin/spamassassin/lib/Mail/SpamAssassin/PerMsgStatus.pm	2002/07/01 09:17:14	1.127
@@ -1880,7 +1880,7 @@
   # insert the leftover stuff from last time
   $_ = $leftover . $_;
   # if there are not a multiple of 4 bytes, keep the leftovers for later
-  m/^((....)*)/; $_=$&; $leftover=$';
+  m/^((?:....)*)(.*)/ ; $_ = $1 ; $leftover = $2 ;
   # turn each group of 4 values into 3 bytes
   s/(....)/&b64decodesub($1)/eg;
   # special processing at EOF for last few bytes
Comment 2 Chip Turner 2002-08-15 14:06:57 EDT
thanks, applied, will be in rawhide soon

Note You need to log in before you can comment on or make changes to this bug.