Opened 19 months ago

Last modified 12 months ago

#7000 new change

Performance and memory usage tradeoffs to give the best experience to most users most of the time — at Version 1

Reported by: mjethani Assignee:
Priority: Unknown Milestone:
Module: Unknown Keywords:
Cc: greiner, arthur, sergz Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)


We have made a few changes to Adblock Plus recently to optimize the performance and memory usage of the product. Most of these changes are based on insights from filter list data, the performance characteristics of the most common platforms (currently V8), and the default settings in the Adblock Plus browser extension.

Our primary goal is to optimize for platforms with limited resources. As a bonus, these optimizations also benefit desktop users on Chrome (primarily), Firefox, and Edge.

Most of these optimizations are based on conscious tradeoffs with best and worst cases.

The rationale behind each change may be found in the individual tickets listed in the table below.

The list of changes

Ticket Status Resolution Summary Component Owner
#6727 closed fixed Use string rather than map for single-domain filters Core mjethani
#6735 closed fixed Store domains in lower case Core mjethani
#6815 closed fixed Avoid multiple copies of domain maps Core mjethani
#6856 closed fixed Remove FilterStorage.moveSubscription Core jsonesen
#6916 closed fixed Avoid Set object for filters with only one subscription Core mjethani
#6967 closed fixed Hold on to only non-standard style sheets Platform mjethani
#6989 closed fixed Optimize CSS rule generation Core mjethani
#6992 closed fixed Remove keyword-by-filter map and associated dead code Core mjethani
#6994 closed fixed Use shortcut matching for filters with no content type, no domain/sitekey, and no third-party flag Core mjethani
#6999 closed fixed Always generate style sheets in the background page Platform mjethani
#7003 closed fixed Implement alternative filter matching algorithm deprioritizing whitelist filters Core mjethani
#7021 closed rejected Compress filter text in memory Core
#7045 closed rejected Optimize V8 memory layout of filter text Core mjethani
#7046 closed fixed Defer caching of domain maps for element hiding filters and exceptions Core mjethani
#7052 closed fixed Use string-based matching for literal patterns Core mjethani
#7089 closed fixed Use type-specific maps for matching non-default types Core mjethani
#7097 closed rejected Make filter objects ephemeral Core mjethani
#7208 closed fixed Drop superfluous wildcards before processing pattern Core mjethani
#7209 closed fixed Treat patterns with trailing separators as literals Core mjethani
#7244 closed fixed Maintain cache of domain-specific style sheets Core mjethani
#7245 closed fixed Move protocol keyword to end of candidate list Core mjethani
#7253 closed fixed Pre-render icons for badge on Chromium Platform mjethani
#7254 closed fixed Expand matcher result cache to ten times the current capacity Core mjethani
#7257 closed fixed Throttle badge updates Platform mjethani
#7265 closed fixed Orgnanize request blocking filters by domain Core mjethani
#7267 closed fixed Optimize memory layout of filter domain maps in matcher Core mjethani
#7296 closed fixed Implement lightweight URL parsing for canonicalized URLs Core mjethani
#7321 closed fixed Lower-case non-literal patterns for case-insensitive matching Core mjethani
#7441 closed rejected Add benchmark command to package.json Core mjethani
#7444 closed fixed Compile patterns for simple filters Core mjethani
#7445 closed rejected Implement faster parsing of generic element hiding filters Core mjethani

Additional notes

This is a meta ticket and should be updated as things evolve.

Change History (1)

comment:1 Changed 18 months ago by mjethani

  • Description modified (diff)
  • Summary changed from (Placeholder issue) to Performance and memory usage tradeoffs to give the best experience to most users most of the time
  • Type changed from defect to change
Note: See TracTickets for help on using tickets.