brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 440 forks source link

Fix #8731: Fix issue with standard mode content blockers with large list #8732

Closed cuba closed 9 months ago

cuba commented 9 months ago

Summary of Changes

This pull request fixes #8731 Also removing a bunch of dead code that just complicates things in fixing this and creates more memory usage during compile.

Submitter Checklist:

Test Plan:

There is no way to reproduce this issue with the current list of rule lists available. Instead we want to test that large lists work as intended:

  1. Add the following custom rule list: https://gist.githubusercontent.com/cuba/f13fce20b8fbd043ac8174e39ba16788/raw/66efa96fd188e2d155e17f5b663b9a2f6e918e7e/TestAdBlockRules.txt
  2. Wait a little bit for it to download and compile (1 minute) as it is quite a large list
  3. Go to brave.com
  4. Brave Logo should be blocked

Screenshots:

Simulator Screenshot - iPhone 14 - 2024-02-02 at 15 42 21

Reviewer Checklist: