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

Reduce adblock regex long term memory usage #26892

Open
atuchin-m opened this issue Nov 21, 2022 · 3 comments
Open

Reduce adblock regex long term memory usage #26892

atuchin-m opened this issue Nov 21, 2022 · 3 comments
Assignees
Labels
feature/shields/adblock Blocking ads & trackers with Shields OS/Android Fixes related to Android browser functionality OS/Desktop perf

Comments

@atuchin-m
Copy link
Contributor

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))

@atuchin-m
Copy link
Contributor Author

brave/adblock-rust#254

@atuchin-m
Copy link
Contributor Author

brave/brave-core#16951

@antonok-edm
Copy link
Collaborator

@atuchin-m is this safe to close now? Also #22339, if there's no other memory leak issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/shields/adblock Blocking ads & trackers with Shields OS/Android Fixes related to Android browser functionality OS/Desktop perf
Projects
None yet
Development

No branches or pull requests

2 participants