Opened 2 years ago

Last modified 2 years ago

#6814 closed change

Avoid redundant calls to getter — at Version 1

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



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 only once in a function and reuse the returned value.

Hints for testers

Same as #6727.

Change History (1)

comment:1 Changed 2 years ago by mjethani

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.