Opened on 01/06/2016 at 11:56:07 AM

Closed on 01/06/2016 at 12:33:31 PM

Last modified on 01/19/2016 at 12:38:32 PM

#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):

https://codereview.adblockplus.org/29333245/

Description

Environment

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 https://en.wikipedia.org/wiki/List_of_country_calling_codes

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.

Background

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.

Attachments (0)

Change History (5)

comment:1 Changed on 01/06/2016 at 11:57:39 AM by trev

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

comment:2 Changed on 01/06/2016 at 12:04:52 PM 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 on 01/06/2016 at 12:33:31 PM by trev

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

comment:4 Changed on 01/18/2016 at 01:48:13 AM 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?

ABP 2.7.0.4128-beta
Firefox 38 / 46.0a1 / Ubuntu 14.04 x64

comment:5 Changed on 01/19/2016 at 12:38:32 PM 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).

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from trev.
 
Note: See TracTickets for help on using tickets.