Opened 5 years ago

Last modified 20 months ago

#279 new change

Experiment with storing filters in more efficiently parseable intermediate format

Reported by: fhd Assignee:
Priority: P5 Milestone:
Module: Core Keywords:
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 (5)

comment:1 Changed 5 years ago by fhd

  • Ready set

comment:2 Changed 5 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 5 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 5 years ago by mapx

  • Cc smultron45@… added

comment:5 Changed 20 months ago by fhd

  • Cc trev removed
Note: See TracTickets for help on using tickets.