#6814 closed change (fixed)

Avoid redundant calls to ActiveFilter.domains getter

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

https://codereview.adblockplus.org/29841555/

Description

Background

In #6727 we optimized the memory usage for single-domain filters, but we forgot to do the corresponding performance optimization. In some of the functions the domains getter is called repeatedly. Since the Map object returned for single-domain filters is now created dynamically on each call, we should minimize the number of calls to this getter.

What to change

In lib/filterClasses.js access this.domains only once in a function and reuse the returned value.

Hints for testers

Same as #6727.

Change History (3)

comment:1 Changed 17 months ago by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 17 months ago by abpbot

A commit referencing this issue has landed:
Issue 6814 - Avoid redundant calls to domains getter

comment:3 Changed 17 months ago by mjethani

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.