Opened on 01/13/2019 at 11:52:14 PM

Closed on 01/14/2019 at 01:28:04 PM

Last modified on 01/23/2019 at 12:19:59 AM

#7210 closed change (fixed)

Skip redundant round-trips to the background page when collapsing elements targeted by the same selector

Reported by: sebastian Assignee: sebastian
Priority: P2 Milestone: Adblock-Plus-3.4.3-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: mjethani, kzar Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

Description (last modified by sebastian)


In include.preload.js, we already keep track of selectors used for element collapsing, in order to avoid injecting the same selector twice. However, we still send a message to the background page for every failed attempt to load an element regardless whether we have seen the resulting selector before. Instead, we could keep tack of all seen selectors (which most of the time will be the same number of selectors we inject), and skip the messaging with the background page altogether for selectors we have seen before.

That way we also avoid Firefox to run out of memory if a page attempts to reload a resource that failed to load (or was blocked) at a high frequency, see Firefox bug 1516508.

What to change

Keep track of all selectors considered for element collapsing, and don't send more than one filters.collapse message for elements that are targeted by an incidental selector.

Attachments (0)

Change History (7)

comment:1 Changed on 01/14/2019 at 12:43:00 AM by sebastian

  • Description modified (diff)

comment:2 Changed on 01/14/2019 at 12:49:33 AM by sebastian

  • Priority changed from Unknown to P2
  • Ready set
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:3 Changed on 01/14/2019 at 01:27:15 PM by abpbot

comment:4 Changed on 01/14/2019 at 01:28:04 PM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:5 Changed on 01/17/2019 at 10:44:14 PM by sebastian

  • Milestone changed from Adblock-Plus-for-Chrome-Opera-Firefox-next to Adblock-Plus-3.4.3-for-Chrome-Opera-Firefox

comment:6 Changed on 01/17/2019 at 10:46:28 PM by abpbot

comment:7 Changed on 01/23/2019 at 12:19:59 AM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Fixed. Reproduced issue with current release, issue is fixed in development build.

Firefox 64.0.2 / Windows 10 (Latest)
Firefox 51.0 / Windows 10 (Min supported)

Add Comment

Modify Ticket

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