AdGuard v4.5.8 for iOS: Filter updates are now up to 30x faster
We’re happy to bring some good news on the verge of 2025. The v4.5.8 update is just a chill guy that makes the app up to 30x faster. Yeah, you heard that right: we did some work on Safari Converter, so now AdGuard filtering rules are converted to Safari rules in just 0.5–2 seconds instead of 10–30. You will notice the difference especially when updating, enabling, or disabling filters and turning protection on.
While at it, we found and reported a problem on Apple’s side — if they fix it in the future, the process will become even faster.
Now let’s take a look at how it all works to see exactly what we improved.
How filter updates work
1. New versions of filters are downloaded
It all starts with downloading new filter versions to the AdGuard app. This part doesn’t cause any trouble.
2. Rules are converted
Next, filtering rules from AdGuard filters are converted to Safari rules. This is where we applied the best of our optimization knowledge to Safari Converter and managed to make the process up to 30x faster.
Here’s the difference in real life.
Before:
After:
3. Rules are loaded to Safari
In this final part things are not that good, because it brings us to the problem on Apple’s side.
For Safari to be able to apply filtering rules, they are compiled into DFA and that is the job of a background process called com.apple.Safari.ContentBlockerLoader
. AdGuard loads new rules for Safari, calls reloadContentBlocker function and just waits for the result. While this is happening, users see the Content blockers are being updated… status in the app.
The problem is that for some reason the loader process performance is artificially limited on iOS and iPadOS to the point where compilation of a rather small content blocker (28Kk rules) can take up to 6–15 seconds (on macOS it completes in fractions of a second). For larger content blockers, the whole thing may take more than 30 seconds.
Needless to say, this is not good for UX. But what’s more important is that it compromises the frequency and swiftness of filter updates, which is crucial for timely fixes and ad blockers’ performance.
For now, we reported this problem to Apple. Here’s the ticket ID in Apple’s Feedback Assistant: FB16130983. We really hope Apple will bring the fix in 2025.
That’s it for this release, don’t forget to update your app to feel the change and share your feedback on our social media or in GitHub’s Issues section. Have a nice holiday season — stay safe online and offline 💚