AdguardForiOS icon indicating copy to clipboard operation
AdguardForiOS copied to clipboard

Issue when enabling DNS with at least 500,000 rules

Open royerlraph79 opened this issue 3 years ago • 6 comments

With anything below 500,000 rules, everything works perfectly. However, when I have 500,000 rules or more, it takes an extremely long time before turning on and it keeps disabling itself. Here's a log in case you need it. AdGuard_logs.zip .

royerlraph79 avatar Feb 12 '22 06:02 royerlraph79

it takes an extremely long time before turning on

Could you please explain this one? Do you mean before the "VPN" icon appears?

According to the log, it takes about 3 seconds to read all the rules and prepare the filtering engine. This is kind of okay for such a huge blocklist.

and it keeps disabling itself

And this is a real problem, it means that we haven't counted the memory usage properly and at some point AdGuard starts using over 15MB RAM. This is a hard limit when OS simply kills the app.

ameshkov avatar Feb 14 '22 08:02 ameshkov

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 08:04 stale[bot]

The task is in the tasks queue, please await for updates.

artemiv4nov avatar Apr 17 '22 20:04 artemiv4nov

@artemiv4nov please note that DnsLibs now expose the setting for the maximum memory limit. The default value might be too small for iOS so we should check which one needs to be used.

ameshkov avatar May 06 '22 07:05 ameshkov

@artemiv4nov please note that DnsLibs now expose the setting for the maximum memory limit. The default value might be too small for iOS so we should check which one needs to be used.

That makes sense, but everything was fine when I was previous iOS versions. What gives?

royerlraph79 avatar May 06 '22 22:05 royerlraph79

@royerlraph79 well, the memory limit hasn't changed, but it's very possible that iOS native network extension's runtime consumes more memory in a newer iOS version hence contributes more into the overall memory usage.

ameshkov avatar May 08 '22 18:05 ameshkov