Opened 6 years ago

Closed 13 months ago

#279 closed change (rejected)

Experiment with storing filters in more efficiently parseable intermediate format

Reported by: fhd Assignee:
Priority: P5 Milestone:
Module: Core Keywords: closed-in-favor-of-gitlab
Cc: smultron45@… Blocked By:
Blocking: Platform:
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):



ABP is loading all filters from the file patterns.ini on startup. We might be able to speed this up considerably if we store them in a format JS engines can parse natively, e.g. JSON.

What to change

Store the filters as a JSON array in patterns.ini. Compare the load time before and after this change. We only want it if it actually improves things.

Change History (6)

comment:1 Changed 6 years ago by fhd

  • Ready set

comment:2 Changed 6 years ago by fhd

  • Cc trev added

Wladimir, I migrated this from Trello, but am not completely sure if it still makes a lot of sense now that we're loading filters in the background on all platforms, so I went with P5. Feel free to change the priority or close this.

comment:3 Changed 6 years ago by trev

It's really a questionable change so I'm fine with leaving it P5 until there is indication that it would improve things. For reference, the INI format was chosen mainly for reasons of readability - many users want to see what data being stored, some even add patterns.ini to version control. JSON readability is a big step backwards.

The issue is also that our data cannot be stored as JSON directly (due to object prototypes and circular references). So when saving data we would need to build up a temporary object structure in memory that can be saved. When loading we would have to reverse the process - construct filters from JSON data. All in all, it isn't clear whether there would be a notable performance advantage.

comment:4 Changed 6 years ago by mapx

  • Cc smultron45@… added

comment:5 Changed 3 years ago by fhd

  • Cc trev removed

comment:6 Changed 13 months ago by sebastian

  • Keywords closed-in-favor-of-gitlab added
  • Resolution set to rejected
  • Status changed from new to closed

Sorry, but we switched to GitLab. If this issue is still relevant, please file it again in the new issue tracker.

Note: See TracTickets for help on using tickets.