Skip to content

Commit

Permalink
Fine-tune static network filtering engine code
Browse files Browse the repository at this point in the history
Refactored heuristics to collate set of origin-related
filter units are collated into a hostname trie, and
for better reuse of existing classes.

Generalized pre-test idea for bucket of filters, such
that in addition to origin-related filter units, there is
now a class to collate regex-based pattern-related units
into a new pre-test bucket class, FilterBucketIfRegexHits,
in order to test with a single regex test whether there is
a chance of a hit in the underlying bucket of filters.
Instances of these are rare, but at time of commit I found
this occurs with AdGuard France filter list.

Fine-tuned the "SNFE: Dump" output -- this new ability to
see the internal details of the SNFE has been really key
into finding/fixing issues during refactoring.
  • Loading branch information
gorhill committed Dec 16, 2021
1 parent fb0de0c commit df56fc5
Show file tree
Hide file tree
Showing 2 changed files with 346 additions and 255 deletions.
4 changes: 2 additions & 2 deletions src/js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ const µBlock = { // jshint ignore:line

// Read-only
systemSettings: {
compiledMagic: 43, // Increase when compiled format changes
selfieMagic: 43, // Increase when selfie format changes
compiledMagic: 44, // Increase when compiled format changes
selfieMagic: 44, // Increase when selfie format changes
},

// https://github.com/uBlockOrigin/uBlock-issues/issues/759#issuecomment-546654501
Expand Down
Loading

0 comments on commit df56fc5

Please sign in to comment.