Speeding up filters - options and tweaks

Forum for MailWasher Pro 7 and/or older 2011/2012 versions.
User avatar
stan_qaz
Omniscient Kiwi
Location: Gilbert, Arizona
Posts: 8671
Joined: Fri Jul 25, 2008 5:13 am

Speeding up filters - options and tweaks

Fri Aug 27, 2010 9:35 am

I didn't see this mentioned recently but there is a filter optimizer built into MW that takes the data you enter and rearranges it a bit for internal use. You can see what it is doing to your filters by looking at the beginning of the log. Using what it shows you and a bit of tweaking you can possibly reorder your filter rules and change the conditions a bit and come up with a faster running filter.

MWPapi log:

Code: Select all

08-26-2010 	12:58:26.109	MWPUI                   	Adding filter: A-Empty
08-26-2010 	12:58:26.125	MWPUI                   	Optimised rule: Name=QS1FbXB0eQ==_1, Field=subject, Expression=(EMPTY\ EMAIL)
08-26-2010 	12:58:26.125	MWPUI                   	Optimised rule: Name=QS1FbXB0eQ==_2, Field=from, Expression=(MWPappAcct)
08-26-2010 	12:58:26.125	MWPUI                   	Adding filter: A-Resent-From MW
08-26-2010 	12:58:26.125	MWPUI                   	Optimised rule: Name=QS1SZXNlbnQtRnJvbSBNVw==_1, Field=header, Expression=((?:^Resent-From: MailWasher? Pro recycle bin))|((?:^Received: from mw.nowhere.com))
I'm debating with myself on a couple filters where I could reorder the rules to put likely hits first and shave a bit of time off the filter but at the expense of readability and ease of maintenance. There have been requests for a search function within the filter edit dialog that would make this a lot more attractive or I could just open the filter.xml file in my web browser and search from there.

I've switched a few filters from plain text to regex so that I could cut down on the amount of text they have to search, things like the "^" to limit the search to the start of the line/field or using the regex "|" or condition to eliminate duplicate searching of the same text in different rules.
I am not a Firetrust employee just a MW user.
--
First rule of computer consulting: Sell a customer a Linux computer and you'll eat for a day,
sell a customer a Windows computer and you'll eat for a lifetime.
User avatar
anniebrion
βeta Tester
Contact:
Location: Milkyway, Sol, Earth, UK, London
Posts: 3222
Joined: Thu Nov 05, 2009 10:39 am

Re: Speeding up filters - options and tweaks

Sat Aug 28, 2010 3:08 am

Thanks for this :) I've now got all bar 1 of my filters optimized so MWP does not have to do it for me :)
Annie.......... PC details
Mailwasher Pro βeta [v 7.12.39]

Return to “MailWasher Pro 7”