Opened on 07/29/2018 at 12:16:42 PM

Closed on 07/30/2018 at 03:01:13 PM

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

Attachments (0)

Change History (3)

comment:1 Changed on 07/29/2018 at 12:19:43 PM by mjethani

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

comment:2 Changed on 07/30/2018 at 03:00:17 PM by abpbot

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

comment:3 Changed on 07/30/2018 at 03:01:13 PM by mjethani

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from mjethani.
 
Note: See TracTickets for help on using tickets.