Changes between Version 1 and Version 2 of Ticket #7098


Ignore:
Timestamp:
11/04/2018 11:17:35 PM (17 months ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7098 – Description

    v1 v2  
    11=== Background === 
    2 In `lib/filterListener.js`, we are calling `setDirty` with a `1` argument, making it write to disk. This makes sense if the filter's hit count has been reset, but it doesn't make sense if it was already zero. To make it worse, the extension repeatedly calls the function with old and new values `0` and `0` respectively on each filter hit, causing repeated writes to the local storage. 
     2In `lib/filterListener.js`, we are calling `setDirty` with a `0` argument, making it write to disk. This makes sense if the filter's hit count has been reset, but it doesn't make sense if it was already zero. To make it worse, the extension repeatedly calls the function with old and new values `0` and `0` respectively on each filter hit, causing repeated writes to the local storage. 
    33 
    44=== What to change === 
    5 If the value of the `oldValue` parameter is `0`, don't call `setDirty` with `1`, instead default to `0.002`. 
     5If the value of the `oldValue` parameter is `0`, don't call `setDirty` with `0`, instead default to `0.002`.