On Mar 18, 2010, at 10:32 PM, Scott MacLean <a...@hollsco.com> wrote:
> The $regex, is, I think what is causing the problem. It is 7,681 > characters long - the contents of my bombRe- and when this is being > combined with a relatively large email, it's just more than the Perl > regex engine can handle. Can you run the code outside of ASSP? Feed the regex to the sample email you have. I don't believe that length of regex should use that much memory. Certainly not from near none to GB's. I know too little perl but I will take a 10,000 charcater regex and try it with sed, or maybe php and see what happens. If either of those pass, I would think there is a bug in perls regex parser. However, perl is sort of the worlds master of regex, making that seem unlikely. It could be a malformed regex that is causing a bug to surface, but just large regex's should not be an issue. This is 6577 characters of regex: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html It is widely used, and I've personally seen it used as a tool to find and help obfuscate email addresses in a mailing list archiver. Though it was ported to php, meaning it will more than likely underperform perl. But that meant calling that function perhaps 10+ times per import of each list message. Not the best comparison, as ASSP is always getting email, though a list archiver in this case was getting 100's every 5 minutes on schedule. A question for those adept in perl: When the perl parser is not fast enough and you need to take the next step to optimization, what do you do? Can perl code fairly easily be converted to something like C and then referenced within perl? Just curious. -- Scott * If you contact me off list replace talklists@ with scott@ * (Sent from a mobile device) ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Assp-test mailing list Assp-test@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/assp-test