[Pkg-mozext-commits] [adblock-plus] 04/22: Issue 2177 - Optimize filter matching performance by performing regexp match last
David Prévot
taffit at moszumanska.debian.org
Wed Apr 1 19:35:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository adblock-plus.
commit df21ebd3274e85aa3fecaaf6e9bc995b2dc3a290
Author: Sebastian Noack <sebastian at adblockplus.org>
Date: Thu Mar 19 18:45:50 2015 +0100
Issue 2177 - Optimize filter matching performance by performing regexp match last
---
lib/filterClasses.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/filterClasses.js b/lib/filterClasses.js
index 1c990c1..330e412 100644
--- a/lib/filterClasses.js
+++ b/lib/filterClasses.js
@@ -618,10 +618,9 @@ RegExpFilter.prototype =
*/
matches: function(location, contentType, docDomain, thirdParty, sitekey)
{
- if (this.regexp.test(location) &&
- (RegExpFilter.typeMap[contentType] & this.contentType) != 0 &&
+ if ((RegExpFilter.typeMap[contentType] & this.contentType) != 0 &&
(this.thirdParty == null || this.thirdParty == thirdParty) &&
- this.isActiveOnDomain(docDomain, sitekey))
+ this.isActiveOnDomain(docDomain, sitekey) && this.regexp.test(location))
{
return true;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git
More information about the Pkg-mozext-commits
mailing list