Opened 2 years ago

Closed 2 years ago

#6929 closed defect (invalid)

Performance of updating subscriptions gets worse with each update

Reported by: mjethani Assignee:
Priority: P2 Milestone:
Module: Core Keywords:
Cc: hfiguiere, jsonesen Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by mjethani)


Adblock Plus core both before and after changes for #6916


While testing the performance for the changes for #6916, I noticed that the performance of the following loop in lib/filterStorage.js gets worse with each update to the filter list:

function addSubscriptionFilters(subscription)
  if (!FilterStorage.knownSubscriptions.has(subscription.url))

  for (let filter of subscription.filters)

Note that this is not related to the changes for #6916, i.e. the behavior is the same both before and after the changes.

How to reproduce

  1. Use the Performance API to measure the time taken by the loop and print out the result to the console
  2. Manually update EasyList on the options page of the extension

Observed behaviour

Each time the loop takes slightly longer to execute. On my machine it's about 2ms longer each time (6ms, 8ms, 10ms, 12ms, 14ms, ...).

Expected behaviour

It should take approximately the same amount of time each time, especially on the second and subsequent updates.

Additional notes

This sort of thing normally points to a memory leak. If this is the case, it's going to be worse now because of the hourly updates to the ABP anti-circumvention filter list.



This was based on an error in my testing.

Change History (3)

comment:1 Changed 2 years ago by mjethani

  • Description modified (diff)

comment:2 Changed 2 years ago by mjethani

  • Description modified (diff)

comment:3 Changed 2 years ago by mjethani

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.