Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterListener.js

Issue 29936555: Issue 7098 - Avoid writing to disk on each filter hit (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Nov. 4, 2018, 11:15 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterListener.js
===================================================================
--- a/lib/filterListener.js
+++ b/lib/filterListener.js
@@ -278,19 +278,19 @@
if (!subscription.disabled &&
filterStorage.knownSubscriptions.has(subscription.url))
{
oldFilters.forEach(removeFilter);
addFilters(subscription.filters);
}
}
-function onFilterHitCount(filter, newValue)
+function onFilterHitCount(filter, newValue, oldValue)
{
- if (newValue == 0)
+ if (newValue == 0 && oldValue != 0)
FilterListener.setDirty(0);
else
FilterListener.setDirty(0.002);
}
function onFilterLastHit()
{
FilterListener.setDirty(0.002);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld