PHANTOM
🇮🇳 IN
Skip to content

Improve cosmetic filtering performance for mutated elements on iOS #48517

@StephenHeaps

Description

@StephenHeaps

Currently on iOS we are debouncing the sending of selectors detected during mutations:
https://github.com/brave/brave-core/blob/18a62515b9f3673c4565808e153964ea610b9830/components/cosmetic_filters/resources/data/content_cosmetic_ios.js#L339

Updating this function to throttle instead of debounce should improve the performance / round trip time between mutated elements being added to the page, determining if they should be hidden by AdBlockEngine, then hiding those mutated elements.

This should re-use the throttle function currently in content_cosmetic_ios.js.

Some additional discussion:
https://bravesoftware.slack.com/archives/C3GNZANPR/p1755376604125699

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions