Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: lib/matcher.js

Issue 29996579: Issue 7254 - Expand matcher result cache capacity to 10,000 entries (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Feb. 2, 2019, 12:22 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 * rules into two {@link Matcher} instances. 415 * rules into two {@link Matcher} instances.
416 */ 416 */
417 class CombinedMatcher 417 class CombinedMatcher
418 { 418 {
419 constructor() 419 constructor()
420 { 420 {
421 /** 421 /**
422 * Maximal number of matching cache entries to be kept 422 * Maximal number of matching cache entries to be kept
423 * @type {number} 423 * @type {number}
424 */ 424 */
425 this.maxCacheEntries = 1000; 425 this.maxCacheEntries = 10000;
426 426
427 /** 427 /**
428 * Matcher for blocking rules. 428 * Matcher for blocking rules.
429 * @type {Matcher} 429 * @type {Matcher}
430 * @private 430 * @private
431 */ 431 */
432 this._blacklist = new Matcher(); 432 this._blacklist = new Matcher();
433 433
434 /** 434 /**
435 * Matcher for exception rules. 435 * Matcher for exception rules.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 682
683 exports.CombinedMatcher = CombinedMatcher; 683 exports.CombinedMatcher = CombinedMatcher;
684 684
685 /** 685 /**
686 * Shared {@link CombinedMatcher} instance that should usually be used. 686 * Shared {@link CombinedMatcher} instance that should usually be used.
687 * @type {CombinedMatcher} 687 * @type {CombinedMatcher}
688 */ 688 */
689 let defaultMatcher = new CombinedMatcher(); 689 let defaultMatcher = new CombinedMatcher();
690 690
691 exports.defaultMatcher = defaultMatcher; 691 exports.defaultMatcher = defaultMatcher;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld