If you want to restrict to a series of literals you might check if the "in" operator is faster: rule "Filter File
Types"
salience 100 // priority when
FileType( type in ("ico","gif","jpg","mov","wmv","jpeg","css","bmp","avi","swf","png") )
then //TODO: change to actual action
System.out.println("ALLOW");
end I don't know if "in" is hashed behind the scenes, but if it is it probably would be much faster, especially because I think mvel recompiles the regex behind the scenes before each evaluation. (A dev please correct me if I'm wrong on that last point.) --- On Mon, 5/10/10, eyal edri <eyal.edri@gmail.com> wrote:
|