Skip to content

Loading…

Cosmetic filter cache: convert watermark-based pruning trigger to time-based pruning trigger #438

Closed
gorhill opened this Issue · 1 comment

1 participant

@gorhill

Currently pruning is triggered using watermarks, with completely arbitrary watermark figures (75-100). The amount of cached CSS selector probably ends up being over the top, hence occupying memory pointlessly.

Using a time interval to trigger pruning makes more sense, given the cosmetic filter cache is useful mostly for when browsing web pages on a specific site withing a set time span. It's just a matter of picking after how long of not being used a cache entry should be considered obsolete.

@gorhill

Actually a sort of combination of both approach would probably be optimal: prune obsolete entries at regular interval, except never throw out the remaining n most recently used entries.

@gorhill gorhill locked and limited conversation to collaborators
@gorhill gorhill added a commit that closed this issue
@gorhill gorhill this fixes #438 c0b9e63
@gorhill gorhill closed this in c0b9e63
@gorhill gorhill added a commit that referenced this issue
@gorhill gorhill code review for #438 aed66e5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Something went wrong with that request. Please try again.