Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#3473 closed defect (fixed)

patterns.ini is being saved on every filter hit after a while

Reported by: trev Assignee: trev
Priority: P1 Milestone: Adblock-Plus-2.7.1-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: no
Review URL(s):



Adblock Plus 2.7.

How to reproduce

  1. Instrument the code to put out a message to console whenever filters are being saved.
  2. Load

Observed behaviour

Filters are being saved several hundred times.

Expected behaviour

While this page produces lots of hits, it still shouldn't cause more than one or two flushes.


It seems that FilterListener.setDirty() forgets to reset isDirty when flushing, so next filter hit triggers a flush again. Hard to believe but it seems that this bug unnoticed for years - from the look of it this isn't a recent regression.

Change History (5)

comment:1 Changed 5 years ago by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 5 years ago by trev

  • Summary changed from patters.ini is being saved on every filter hit after a while to patterns.ini is being saved on every filter hit after a while

comment:3 Changed 5 years ago by trev

  • Milestone set to Adblock-Plus-for-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:4 Changed 4 years ago by Ross

  • Tester changed from Unknown to Ross

This seems to be fixed (the file is not his constantly, but now I'm not sure when patterns.ini is supposed to be written to? It didn't seem to be updated when the browser was closed?

Firefox 38 / 46.0a1 / Ubuntu 14.04 x64

comment:5 Changed 4 years ago by trev

No, it's only saved on important changes - meaning you changing something manually. As to filter hits, these aren't considered important and are only saved after a while (500 hits I think).

Note: See TracTickets for help on using tickets.