Opened 2 years ago

Last modified 2 years ago

#6814 closed change

Avoid redundant calls to ActiveFilter.domains getter — at Initial Version

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 (0)

Note: See TracTickets for help on using tickets.