Reduce adblock regex long term memory usage #26892
Labels
feature/shields/adblock
Blocking ads & trackers with Shields
OS/Android
Fixes related to Android browser functionality
OS/Desktop
perf
In #22339 was found that rust Regex objects in rust-adblock consumes a lot of memory. In addition they never are deleted even the corresponding rule wasn't used any more. That seriously affects long term memory usage of the browser process.
To fix this usage only some number of recent reg expressions should be stored.
All the regex should be put in some "regex cache storage" and some cache replacement policy should be implemented (https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU))
The text was updated successfully, but these errors were encountered: