#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)

Environment

Adblock Plus core both before and after changes for #6916

Background

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))
    return;

  for (let filter of subscription.filters)
    filter.addSubscription(subscription);
}   

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.

Resolution

Invalid.

This was based on an error in my testing.

Change History (3)

comment:1 Changed 16 months ago by mjethani

  • Description modified (diff)

comment:2 Changed 16 months ago by mjethani

  • Description modified (diff)

comment:3 Changed 16 months ago by mjethani

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