Opened 7 months ago

Last modified 9 days ago

#7000 new change

Performance and memory usage tradeoffs to give the best experience to most users most of the time

Reported by: mjethani Assignee:
Priority: Unknown Milestone:
Module: Unknown Keywords:
Cc: greiner, arthur, sergz Blocked By: #6437, #6727, #6735, #6815, #6856, #6916, #6957, #6967, #6989, #6992, #6994, #6999, #7003, #7021, #7029, #7045, #7046, #7052, #7089, #7096, #7097, #7208, #7209, #7244, #7245, #7253, #7254, #7257, #7265, #7267, #7296, #7321, #7435, #7441, #7444, #7445
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)

Background

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
#6437 closed fixed Optimize element hiding emulation for DOM modifications Core mjethani
#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
#6957 closed fixed Combine element hiding selector matching with style sheet generation 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 new Compress filter text in memory Core
#7029 reviewing Remove subscriptions property of Filter object Core mjethani
#7045 new 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
#7096 closed rejected Make it possible to lazy initialize a filter's subscriptions Core mjethani
#7097 reviewing 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
#7435 closed fixed Use request object for filter matching Core mjethani
#7441 new 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 (56)

comment:1 Changed 7 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

comment:2 Changed 7 months ago by mjethani

  • Blocked By 6735 added

comment:3 Changed 7 months ago by mjethani

  • Blocked By 6967 added

comment:4 Changed 7 months ago by mjethani

  • Blocked By 6916 added

comment:5 Changed 7 months ago by mjethani

  • Blocked By 6815 added

comment:6 Changed 7 months ago by mjethani

  • Blocked By 6957 added

comment:7 Changed 7 months ago by mjethani

  • Blocked By 7003 added

comment:8 Changed 7 months ago by mjethani

  • Blocked By 6989 added

comment:9 Changed 7 months ago by mjethani

  • Blocked By 6727 added

comment:10 Changed 7 months ago by mjethani

  • Blocked By 6437 added

comment:11 Changed 7 months ago by mjethani

  • Blocked By 6437 removed

comment:12 Changed 7 months ago by mjethani

  • Blocked By 6437 added

comment:13 Changed 7 months ago by mjethani

  • Blocked By 6856 added

comment:14 Changed 7 months ago by mjethani

  • Blocked By 6992 added

comment:15 Changed 7 months ago by greiner

  • Cc greiner added

comment:16 Changed 7 months ago by mjethani

  • Blocked By 6999 added

comment:17 Changed 7 months ago by mjethani

  • Description modified (diff)

comment:18 Changed 7 months ago by mjethani

  • Blocked By 7021 added

comment:19 Changed 6 months ago by mjethani

  • Blocked By 7029 added

comment:20 Changed 6 months ago by mjethani

  • Blocked By 7045 added

comment:21 Changed 6 months ago by mjethani

  • Description modified (diff)

comment:22 Changed 6 months ago by mjethani

  • Blocked By 7046 added

comment:23 Changed 6 months ago by mjethani

  • Blocked By 7052 added

comment:24 Changed 6 months ago by mjethani

  • Blocked By 7058 added

comment:25 Changed 6 months ago by mjethani

  • Blocked By 7058 removed

comment:26 Changed 6 months ago by mjethani

  • Blocked By 6994 added

comment:27 Changed 6 months ago by mjethani

  • Blocked By 7089 added

comment:28 Changed 6 months ago by arthur

  • Cc arthur added

comment:29 Changed 6 months ago by mjethani

  • Blocked By 7094 added

comment:30 Changed 6 months ago by mjethani

  • Blocked By 7097 added

comment:31 Changed 6 months ago by mjethani

  • Blocked By 7096 added

comment:32 Changed 6 months ago by mjethani

  • Blocked By 7094 removed

comment:33 Changed 5 months ago by sergz

  • Cc sergz added

comment:34 Changed 3 months ago by mjethani

  • Blocked By 7202 added

comment:35 Changed 3 months ago by mjethani

  • Blocked By 7208 added

comment:36 Changed 3 months ago by mjethani

  • Blocked By 7209 added

comment:37 Changed 3 months ago by mjethani

  • Blocked By 7202 removed

comment:38 Changed 3 months ago by mjethani

  • Blocked By 7244 added

comment:39 Changed 3 months ago by mjethani

  • Blocked By 7245 added

comment:40 Changed 2 months ago by mjethani

  • Blocked By 7253 added

comment:41 Changed 2 months ago by mjethani

  • Blocked By 7254 added

comment:42 Changed 2 months ago by mjethani

  • Blocked By 7257 added

comment:43 Changed 2 months ago by mjethani

  • Blocked By 7265 added

comment:44 Changed 2 months ago by mjethani

  • Blocked By 7267 added

comment:45 Changed 2 months ago by mjethani

  • Blocked By 7296 added

comment:46 Changed 7 weeks ago by mjethani

  • Blocked By 7311 added

comment:47 Changed 7 weeks ago by mjethani

  • Blocked By 7311 removed

comment:48 Changed 7 weeks ago by mjethani

  • Blocked By 7321 added

comment:49 Changed 6 weeks ago by mjethani

  • Blocked By 7324 added

comment:50 Changed 5 weeks ago by mjethani

  • Blocked By 7324 removed

comment:51 Changed 2 weeks ago by mjethani

  • Blocked By 7435 added

comment:52 Changed 13 days ago by mjethani

  • Blocked By 7441 added

comment:53 Changed 11 days ago by mjethani

  • Blocked By 7444 added

comment:54 Changed 11 days ago by mjethani

  • Blocked By 7445 added

comment:55 Changed 9 days ago by mjethani

  • Blocked By 7452 added

comment:56 Changed 9 days ago by mjethani

  • Blocked By 7452 removed
Note: See TracTickets for help on using tickets.