Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uBlock Origin向けのフィルターをダイエットする #7

Closed
ncaq opened this issue Sep 13, 2021 · 3 comments
Closed

uBlock Origin向けのフィルターをダイエットする #7

ncaq opened this issue Sep 13, 2021 · 3 comments
Labels
Priority: High Type: Breaking Change Includes breaking changes Type: Bug Bug or Bug fixes Type: Feature New Feature Type: Maintenance Repository Maintenance

Comments

@ncaq
Copy link
Owner

ncaq commented Sep 13, 2021

uBlock Origin向けのルールも生成する · Issue #5 · ncaq/uBlacklistRule
は一応ルールを生成したので閉じました。
しかしこのルールには問題があり、
ルールが2万行ぐらいになるからか、
Google検索がとても重くなります。
コンテンツスクリプトの方で動かしてるのかな?デスクトップPCでモバイルエミュレートしても重いぐらいですし、スマートフォンではめっちゃカクつきます。
フィルターのダイエットが必要でしょう。

@ncaq ncaq added Type: Bug Bug or Bug fixes Type: Feature New Feature Priority: High Estimate: 4 Type: Breaking Change Includes breaking changes Type: Maintenance Repository Maintenance labels Sep 13, 2021
@ncaq
Copy link
Owner Author

ncaq commented Sep 13, 2021

すぐに思いつく改善案はいくつかあります。

  1. 除いても問題のないルールを見つける
  2. 実在しないホストを除外する
  3. uBlock Originの除外機構が遅いのは諦めて、機械生成部分はある程度妥協してこちらには入れない

ncaq added a commit that referenced this issue Sep 13, 2021
[uBlock Origin向けのフィルターをダイエットする · Issue #7 · ncaq/uBlacklistRule](#7)
の改善案1。
手元で試してみた所、
この一つのみが必要なフィルター記述でした。
ncaq added a commit that referenced this issue Sep 13, 2021
[uBlock Origin向けのフィルターをダイエットする · Issue #7 · ncaq/uBlacklistRule](#7)
の改善案1。
手元で試してみた所、
少なくとも私のFirefox for Androidの環境では必要なのはこの2つでした。
@ghost
Copy link

ghost commented Sep 13, 2021

uBlacklistと異なり単に部分一致させているだけなので、TLDの自動生成は完全に不要ではないでしょうか (もし必要なら正規表現も書けます)。
なお後者2つはGoogle Search Fixer有効がメインの環境なら必要です。たまに現れるFeatured SnippetsとPeople also askを消しています。

ncaq added a commit that referenced this issue Sep 13, 2021
[uBlock Origin向けのフィルターをダイエットする · Issue #7 · ncaq/uBlacklistRule](#7)
の解決策2。
DNSレコードに一切登録せずにスパムすることは困難だろうので、
これをすり抜けてくる恐れは少ないと判断しています。
@ncaq
Copy link
Owner Author

ncaq commented Sep 13, 2021

作業あらかた終わってからコメントに気がついた…

uBlacklistと異なり単に部分一致させているだけなので、TLDの自動生成は完全に不要ではないでしょうか (もし必要なら正規表現も書けます)。

たしかに…

なお後者2つはGoogle Search Fixer有効がメインの環境なら必要です。たまに現れるFeatured SnippetsとPeople also askを消しています。

エミュレータで適当に見て後者2つがヒットしなかったので要らないのかと思ってしまいました。
そういうことだったんですね。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Type: Breaking Change Includes breaking changes Type: Bug Bug or Bug fixes Type: Feature New Feature Type: Maintenance Repository Maintenance
Projects
None yet
Development

No branches or pull requests

1 participant