AdguardTeam / AdguardTeam/AdGuardHome

Use a Bloom filter as pre-check

オープン
#7,928 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
feature request
主要言語
TypeScript
スター
36.9k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

### The problem

Linear search over rules is asymptotically slow. It's usually good enough, but as the number of rules grows, or when we deploy it on underpowered hardware like consumer routers, this becomes a major issue

But only about 20~40% of all queries are actually blocked. Skipping the extensive matching for them can have a disproportional effect on performance.

### Proposed solution

Bloom filters are a probabilistic data structure that can tell you in O(1) if an element might belong to a set. Using this, we can quickly tell if a domain is certainly not in the block list and process that query. [Bloom Filters by Example](https://llimllib.github.io/bloomfilter-tutorial/) has been an excellent introduction to the topic.

Chrome already uses them for reducing Safe Browsing look-ups [](https://web.archive.org/web/20160306232658/http://blog.alexyakunin.com/2010/03/nice-bloom-filter-application.html) .

### Alternatives considered and additional information

Previously mentioned in #2041

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。