Changes between Initial Version and Version 1 of Ticket #6729


Ignore:
Timestamp:
06/05/2018 07:50:33 AM (21 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6729 – Description

    initial v1  
    1414 2.  '''Compact trie storage''': The constructor of the `Filter` class, instead of holding on to the string object passed to it, could "archive" the text in a [https://en.wikipedia.org/wiki/Trie trie]. Since the filter text can be neatly split up into its component parts (URL pattern, options, domain names, CSS selector, etc.), each part could be archived independently by the specialized subclasses like `RegExpFilter`, `ElemHideBase`, and so on. In the `text` getter of each subclass, the relevant component parts could be retrieved from the trie to reconstruct the original filter text. 
    1515 
    16  The trie could be implemented as a "compact" trie such that the keys `foobar`, `food`, and `foist` results in 5 nodes (`fo`, `o`, `bar`, `d`, `ist`) rather than the 10 nodes in a standard trie (`f`, `o`, `o`, `b`, `a`, `r`, `d`, `i`, `s`, `t`). 
     16 The trie could be implemented as a "compact" trie such that the keys `foobar`, `food`, and `foist` result in 5 nodes (`fo`, `o`, `bar`, `d`, `ist`) rather than the 10 nodes in a standard trie (`f`, `o`, `o`, `b`, `a`, `r`, `d`, `i`, `s`, `t`). 
    1717 
    1818 For domain names, the ''reverse'' of the domain name could be added to the trie instead, since the common "prefix" occurs at the end rather than the beginning.